Philipp Hörist pushed to branch master at gajim / gajim
Commits: d7d80b47 by Philipp Hörist at 2023-01-02T19:22:29+01:00 cq: Use OSError instead of alias
- - - - -
3 changed files:
- gajim/common/jingle_ft.py - gajim/common/modules/bytestream.py - gajim/plugins/pluginmanager.py
Changes:
===================================== gajim/common/jingle_ft.py ===================================== @@ -289,7 +289,7 @@ def _compute_hash(self) -> Optional[nbxmpp.Hashes2]: return try: file_ = open(self.file_props.file_name, 'rb') - except IOError: + except OSError: # can't open file return h = nbxmpp.Hashes2()
===================================== gajim/common/modules/bytestream.py ===================================== @@ -360,7 +360,7 @@ def _add_upnp_igd_as_streamhost_to_query(self, # check if we are connected with an IPv4 address try: socket.inet_aton(my_ip) - except socket.error: + except OSError: self._con.connection.send(iq) return
===================================== gajim/plugins/pluginmanager.py ===================================== @@ -572,7 +572,7 @@ def install_from_zip(self, except zipfile.BadZipfile: # it is not zip file raise PluginsystemError(_('Archive corrupted')) - except IOError: + except OSError: raise PluginsystemError(_('Archive empty'))
if zip_file.testzip():
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/d7d80b47d867577378e91d3993c901a58...