summary refs log tree commit diff
path: root/synapse/handlers/device.py
diff options
context:
space:
mode:
authorNotAFile <nota@notafile.com>2018-03-15 16:11:17 +0100
committerNotAFile <nota@notafile.com>2018-03-15 16:11:17 +0100
commit2cc9f76bc3cfa012dcdfe614bdda7e689b8b5e65 (patch)
treeb9067a68b9a1638a25fa4c1908d6ea6014c7d30f /synapse/handlers/device.py
parentMerge pull request #3003 from matrix-org/rav/fix_contributing (diff)
downloadsynapse-2cc9f76bc3cfa012dcdfe614bdda7e689b8b5e65.tar.xz
replace old style error catching with 'as' keyword
This is both easier to read and compatible with python3 (not that that
matters)

Signed-off-by: Adrian Tschira <nota@notafile.com>
Diffstat (limited to '')
-rw-r--r--synapse/handlers/device.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py
index 40f3d24678..f7457a7082 100644
--- a/synapse/handlers/device.py
+++ b/synapse/handlers/device.py
@@ -155,7 +155,7 @@ class DeviceHandler(BaseHandler):
 
         try:
             yield self.store.delete_device(user_id, device_id)
-        except errors.StoreError, e:
+        except errors.StoreError as e:
             if e.code == 404:
                 # no match
                 pass
@@ -204,7 +204,7 @@ class DeviceHandler(BaseHandler):
 
         try:
             yield self.store.delete_devices(user_id, device_ids)
-        except errors.StoreError, e:
+        except errors.StoreError as e:
             if e.code == 404:
                 # no match
                 pass
@@ -243,7 +243,7 @@ class DeviceHandler(BaseHandler):
                 new_display_name=content.get("display_name")
             )
             yield self.notify_device_update(user_id, [device_id])
-        except errors.StoreError, e:
+        except errors.StoreError as e:
             if e.code == 404:
                 raise errors.NotFoundError()
             else: