summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Kreen2013-01-20 20:55:13 +0000
committerMarko Kreen2013-01-20 20:55:13 +0000
commit25b3c7047e7dbfd196eb061e40c44fbf4e8eeaf6 (patch)
treeaa732de3cbc9c1248393fd478a3628bbd433d636
parent47d033297969e21965af7524f07f67f2aedb9c46 (diff)
scriptmgr: fix ~ expansion
-rwxr-xr-xscripts/scriptmgr.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/scriptmgr.py b/scripts/scriptmgr.py
index 6aa82c78..57fd7a46 100755
--- a/scripts/scriptmgr.py
+++ b/scripts/scriptmgr.py
@@ -83,7 +83,12 @@ def full_path(job, fn):
if not fn:
return fn
if fn[0] == '~':
- user, rest = fn.split('/',1)[0]
+ if fn.find('/') > 0:
+ user, rest = fn.split('/',1)
+ else:
+ user = fn
+ rest = ''
+
user = user[1:]
if not user:
user = job['user']