瀏覽代碼

libpython: formating cosmetics in get_lib_path()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67899 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 9 年之前
父節點
當前提交
20626ad9eb
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      lib/python/script/utils.py

+ 3 - 1
lib/python/script/utils.py

@@ -288,7 +288,9 @@ def get_lib_path(modname, libname=None):
         idx = cwd.find(modname)
         if idx < 0:
             return None
-        path = cwd[:idx+len(modname)] + sep + 'etc' + sep + modname
+        path = '{cwd}{sep}etc{sep}{modname}'.format(cwd=cwd[:idx+len(modname)],
+                                                    sep=sep,
+                                                    modname=modname)
     
     return path