From 722d29c9316e56dfbc6d27603435f333ce5f562c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 7 Nov 2014 16:59:32 +0100 Subject: [PATCH] bam cli: fix for recent commit --- client/cli/bam.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client/cli/bam.py b/client/cli/bam.py index 81c03d8..d302c5e 100755 --- a/client/cli/bam.py +++ b/client/cli/bam.py @@ -238,6 +238,9 @@ class bam_session: class bam_commands: + """ + Sub-commands from the command-line map directly to these methods. + """ # fake module __slots__ = () @@ -251,7 +254,7 @@ class bam_commands: if "@" in url: # first & last :) - username, url = url.rpartition('@')[0:3:2] + username, url = url.rpartition('@')[0::2] else: import getpass username = getpass.getuser() @@ -449,7 +452,7 @@ class bam_commands: return - for fn_rel, fn_abs in paths_modified.items(): + for fn_rel, fn_abs in list(paths_modified.items()): # we may want to be more clever here deps = deps_remap.get(fn_rel) if deps: @@ -468,6 +471,8 @@ class bam_commands: if os.path.exists(fn_abs_remap): fn_abs = fn_abs_remap + paths_modified[fn_rel] = fn_abs + # ------------------------- print("Now make a zipfile") import zipfile @@ -557,7 +562,6 @@ class bam_commands: for fn in sorted(paths_remove): print(" D: %s" % fn) - @staticmethod def list_dir(paths): import requests @@ -608,8 +612,6 @@ class bam_commands: print(" %r -> %r" % (os.path.join(fp.basedir, fp_blend_basename), fp.filepath)) - - def subcommand_init_cb(args): bam_commands.init(args.url, args.directory_name)