|
24 | 24 | # Import the necessary modules of the program
|
25 | 25 | import routing_logging
|
26 | 26 |
|
27 |
| -## @var ABSOLUTE_PATH |
28 |
| -# This constant stores a string with an absolute path to the program's main directory. |
29 |
| -ABSOLUTE_PATH = routing_logging.ABSOLUTE_PATH |
| 27 | +## @var PATH_TO_LOGS |
| 28 | +# This constant stores a string with an absolute path to log files directory. |
| 29 | +PATH_TO_LOGS = routing_logging.PATH_TO_LOGS |
30 | 30 | ## @var NEIGHBOR_LOG
|
31 | 31 | # Global routing_logging.LogWrapper object for logging NeighborDiscovery activity.
|
32 | 32 | NEIGHBOR_LOG = routing_logging.create_routing_log("routing.neighbor_discovery.log", "neighbor_discovery")
|
@@ -59,7 +59,7 @@ class NeighborDiscovery:
|
59 | 59 | # @return None
|
60 | 60 | def __init__(self, raw_transport_obj, table_obj):
|
61 | 61 | # Create initial empty neighbors file
|
62 |
| - f = open(ABSOLUTE_PATH + "/neighbors_file", "w") |
| 62 | + f = open(PATH_TO_LOGS + "neighbors_file", "w") |
63 | 63 | f.close()
|
64 | 64 | # Create listening and advertising threads
|
65 | 65 | ## @var listen_neighbors_handler
|
@@ -281,7 +281,7 @@ def process_neighbor(self, src_mac, dsr_hello_message):
|
281 | 281 | # @param self The object pointer.
|
282 | 282 | # @return None
|
283 | 283 | def update_neighbors_file(self):
|
284 |
| - f = open(ABSOLUTE_PATH + "/neighbors_file", "w") |
| 284 | + f = open(PATH_TO_LOGS + "neighbors_file", "w") |
285 | 285 | for mac in self.neighbors_list:
|
286 | 286 |
|
287 | 287 | NEIGHBOR_LOG.debug("Neighbor's IPs: %s", str(self.neighbors_list[mac].l3_addresses))
|
|
0 commit comments