diff --git a/pandora_client/__init__.py b/pandora_client/__init__.py index cf816d1..2eefd7b 100755 --- a/pandora_client/__init__.py +++ b/pandora_client/__init__.py @@ -115,6 +115,13 @@ def ignore_file(client, path): return True return False +def is_oshash(oshash): + try: + int(oshash, 16) + except: + return False + return len(oshash) == 16 + def hide_cursor(): sys.stdout.write("\033[?25l") sys.stdout.flush() @@ -654,6 +661,9 @@ class Client(object): 'filename': filename }) data.append(oshash) + elif not is_oshash(arg): + print 'file not found "%s"' % arg + sys.exit(1) else: data.append(arg) files = []