diff options
Diffstat (limited to 'fb')
-rwxr-xr-x | fb | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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', '') |