]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
support/css.py: don't use PWD but TVHDIR, fixes #3332
authorJaroslav Kysela <perex@perex.cz>
Sat, 21 Nov 2015 20:02:26 +0000 (21:02 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 21 Nov 2015 20:02:41 +0000 (21:02 +0100)
support/css.py

index 2f30cf4cb5a430d24618bf4cbe2a7ebb59ffeb08..32eaefceca0abe5aafd7f0541cfce4a87048f05c 100755 (executable)
@@ -7,7 +7,6 @@ import sys, os
 
 VERBOSE = 'V' in os.environ and len(os.environ['V']) > 0
 TVHDIR = os.path.realpath('.')
-PWD = os.path.realpath(os.environ['PWD'])
 
 def info(fmt, *msg):
   sys.stderr.write(" [INFO ] " + (fmt % msg) + '\n')
@@ -38,7 +37,7 @@ def url(fn):
 
   f = utf8open(fn, 'r')
   if fn[0] != '/':
-    fn = os.path.join(PWD, fn)
+    fn = os.path.join(TVHDIR, fn)
   fn = os.path.normpath(fn)
   if VERBOSE:
     info('css: %s', fn)
@@ -78,7 +77,7 @@ def url(fn):
 def utf_check(fn):
   f = utf8open(fn, 'r')
   if fn[0] != '/':
-    fn = os.path.join(PWD, fn)
+    fn = os.path.join(TVHDIR, fn)
   fn = os.path.normpath(fn)
   if VERBOSE:
     info('utf-check: %s', fn)