diff options
author | Didier Raboud <odyx@debian.org> | 2016-01-06 12:33:02 +0100 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2014-06-15 16:42:46 +1000 |
commit | 361b32cb517fcc214063880475b991c0e9aa660c (patch) | |
tree | 8a0583d0191e1e11d28d638bf8b873c5a6c4d1d6 /timedate.py | |
parent | f1226f7126ab280868e2817699b6b3ee03567a52 (diff) |
Imported Upstream version 3.15.2
Diffstat (limited to 'timedate.py')
-rwxr-xr-x | timedate.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/timedate.py b/timedate.py index 25f48e31e..70a75577d 100755 --- a/timedate.py +++ b/timedate.py @@ -73,9 +73,12 @@ try: filter={'fax-type': (operator.gt, 0)}, back_end_filter=['hpfax']) + if not device_uri: + sys.exit(1) + try: d = faxdevice.FaxDevice(device_uri, printer_name, disable_dbus=True) - except Error, e: + except Error as e: if e.opt == ERROR_DEVICE_DOES_NOT_SUPPORT_OPERATION: log.error("Device does not support setting time/date.") sys.exit(1) |