Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Catch more specific exceptions.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 24 Jan 2022 14:07:53 +0000 (15:07 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 24 Jan 2022 15:38:43 +0000 (16:38 +0100)
tools/appveyor-irc-notify.py
tools/tesh/tesh.py

index 463104f..fee4c01 100644 (file)
@@ -174,7 +174,7 @@ if __name__ == '__main__':
                 # leave the channel
                 irc_sock.send('PART #{}\r\n'.format(channel).encode('utf_8'))
                 sys.exit()
-    except BaseException:
+    except Exception:
         e = sys.exc_info()[0]
         print(e)
         sys.exit()
index 8b9ae29..69a0617 100755 (executable)
@@ -122,7 +122,7 @@ def kill_process_group(pid):
 
     try:
         pgid = os.getpgid(pid)
-    except:
+    except OSError:
         # os.getpgid failed. Ok, don't cleanup.
         return