Explorar el Código

Import sympy (if it exists) regardless of the setting of symbolic_byte_counters

So that symbolic_byte_counters could be set to True at runtime
Ian Goldberg hace 5 años
padre
commit
6a3410a2f6
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      network.py

+ 3 - 1
network.py

@@ -12,8 +12,10 @@ from enum import Enum
 # You will need sympy installed for this to work.
 symbolic_byte_counters = False
 
-if symbolic_byte_counters:
+try:
     import sympy
+except:
+    pass
 
 # Network parameters