From c31a8f61f933fa3f7d91fe6c31cd086f1451dae3 Mon Sep 17 00:00:00 2001
From: Gonzalo Belcredi <gbelcredi@fing.edu.uy>
Date: Fri, 5 Jun 2020 10:28:02 -0300
Subject: [PATCH] importlib

---
 channel.py | 6 ++----
 main.py    | 7 ++-----
 node.py    | 6 ++----
 objects.py | 6 ++----
 stats.py   | 6 ++----
 storage.py | 6 ++----
 utils.py   | 6 ++----
 7 files changed, 14 insertions(+), 29 deletions(-)

diff --git a/channel.py b/channel.py
index 1dba07d..bec825f 100644
--- a/channel.py
+++ b/channel.py
@@ -1,9 +1,7 @@
 import numpy as np
 import importlib
-try:
-  importlib.reload(config)
-except:
-  import config
+import config
+importlib.reload(config)
 class Channel:
     def __init__(self, ChannelId, NumberNodes, Capacity, SlopeLin, SlopeSat):
         self.Capacity = Capacity
diff --git a/main.py b/main.py
index 6bc8270..2ee5ca4 100644
--- a/main.py
+++ b/main.py
@@ -5,11 +5,8 @@ from time import sleep
 import objects
 import node
 import importlib
-try:
-  importlib.reload(config)
-except:
-  import config
-
+import config
+importlib.reload(config)
 import utils
 
 StorageObj = objects.StorageObj
diff --git a/node.py b/node.py
index 6cb2eb7..bee40e9 100644
--- a/node.py
+++ b/node.py
@@ -1,9 +1,7 @@
 import numpy as np
 import importlib
-try:
-  importlib.reload(config)
-except:
-  import config
+import config
+importlib.reload(config)
 import math
 import objects
 import packet
diff --git a/objects.py b/objects.py
index f3330f8..c8b5d2c 100644
--- a/objects.py
+++ b/objects.py
@@ -2,10 +2,8 @@ import channel
 import storage
 import stats
 import importlib
-try:
-  importlib.reload(config)
-except:
-  import config
+import config
+importlib.reload(config)
 import numpy as np
 
 
diff --git a/stats.py b/stats.py
index 8da6ed9..f333d60 100644
--- a/stats.py
+++ b/stats.py
@@ -1,8 +1,6 @@
 import importlib
-try:
-  importlib.reload(config)
-except:
-  import config
+import config
+importlib.reload(config)
 import numpy as np
 
 
diff --git a/storage.py b/storage.py
index 885480f..01e8aa7 100644
--- a/storage.py
+++ b/storage.py
@@ -1,9 +1,7 @@
 import random
 import importlib
-try:
-  importlib.reload(config)
-except:
-  import config
+import config
+importlib.reload(config)
 
 import numpy as np
 
diff --git a/utils.py b/utils.py
index cc32bfe..d6511c0 100644
--- a/utils.py
+++ b/utils.py
@@ -1,8 +1,6 @@
 import importlib
-try:
-  importlib.reload(config)
-except:
-  import config
+import config
+importlib.reload(config)
 
 import numpy as np
 import math
-- 
GitLab