]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
css.py: fix PWD usage
authorJaroslav Kysela <perex@perex.cz>
Sun, 24 May 2015 18:52:08 +0000 (20:52 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sun, 24 May 2015 18:52:08 +0000 (20:52 +0200)
support/css.py

index 3d0558f56737722066a046143bcd102f4dc89345..2f30cf4cb5a430d24618bf4cbe2a7ebb59ffeb08 100755 (executable)
@@ -7,6 +7,7 @@ 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')
@@ -37,7 +38,7 @@ def url(fn):
 
   f = utf8open(fn, 'r')
   if fn[0] != '/':
-    fn = os.path.join(os.environ['PWD'], fn)
+    fn = os.path.join(PWD, fn)
   fn = os.path.normpath(fn)
   if VERBOSE:
     info('css: %s', fn)
@@ -77,7 +78,7 @@ def url(fn):
 def utf_check(fn):
   f = utf8open(fn, 'r')
   if fn[0] != '/':
-    fn = os.path.join(os.environ['PWD'], fn)
+    fn = os.path.join(PWD, fn)
   fn = os.path.normpath(fn)
   if VERBOSE:
     info('utf-check: %s', fn)