summaryrefslogtreecommitdiffstats
path: root/fb
diff options
context:
space:
mode:
Diffstat (limited to 'fb')
-rwxr-xr-xfb13
1 files changed, 6 insertions, 7 deletions
diff --git a/fb b/fb
index 1fd5c34..67292e2 100755
--- a/fb
+++ b/fb
@@ -82,18 +82,17 @@ def main():
p = OptionParser(version=__version__,
usage=__doc__,
description=__desc__+password.__doc__)
- p.add_option('-d', '--delete', action='append', dest='delete',
- help='delete file by ID', metavar='<ID>', default=None)
+ p.add_option('-d', '--delete', action='store_true', dest='delete',
+ help='delete IDs', default=False)
options, args = p.parse_args()
- if options.delete:
- for id in options.delete:
- delete(id)
- sys.exit()
-
tmpfiles = []
if args:
for arg in args:
+ if options.delete:
+ delete(arg)
+ continue
+
if arg.find('http://') != -1:
tmpdir = Popen(['mktemp', '-d'], stdout=PIPE).communicate()[0]
tmpdir = tmpdir.replace('\n', '')