Skip to content

Commit 9e0e651

Browse files
committed
Change default session_id to None, because that makes more sense
1 parent c310aee commit 9e0e651

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gridmap/job.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def __init__(self, temp_dir='/scratch'):
275275
# uninitialized field (set in check method)
276276
self.jobs = []
277277
self.ids = []
278-
self.session_id = -1
278+
self.session_id = None
279279
self.id_to_job = {}
280280

281281
def __enter__(self):
@@ -293,7 +293,7 @@ def __exit__(self, exc_type, exc_value, exc_tb):
293293
self.socket.close()
294294

295295
# Clean up if we have a valid session
296-
if self.session_id != -1:
296+
if self.session_id is not None:
297297
with Session(self.session_id) as session:
298298
# If we encounter an exception, kill all jobs
299299
if exc_type is not None:

0 commit comments

Comments
 (0)