mirror of
https://github.com/xcat2/confluent.git
synced 2025-08-28 22:08:26 +00:00
Exit if requested upload file does not exist
It was fruitlessly sending to server, when it could detect the problem up front without bothering the server.
This commit is contained in:
@@ -101,6 +101,10 @@ def detach_media(noderange, media):
|
||||
|
||||
def upload_media(noderange, media):
|
||||
global exitcode
|
||||
if not os.path.exists(media):
|
||||
sys.stderr.write('Unable to locate requested file {0}\n'.format(
|
||||
media))
|
||||
sys.exit(404)
|
||||
session = client.Command()
|
||||
output = sq.ScreenPrinter(noderange, session)
|
||||
filename = os.path.abspath(media)
|
||||
|
Reference in New Issue
Block a user