Skip to content

Commit 2278cce

Browse files
committed
Fixed an error in the submission
1 parent f8663bd commit 2278cce

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

Modules/Cluster.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,16 +321,17 @@ def __setattr__(self, name, value):
321321
""".format(name, type(self).__name__, similar_objects)
322322

323323
raise AttributeError(ERROR_MSG)
324+
325+
# Setting the account or partition name will automatically result in
326+
# activating the corresponding flags
327+
if name.endswith("_name"):
328+
key = "use_{}".format(name.split("_")[0])
329+
self.__dict__[key] = True
324330
else:
325331
super(Cluster, self).__setattr__(name, value)
326332

327333

328-
# Setting the account or partition name will automatically result in
329-
# activating the corresponding flags
330-
if name.endswith("_name"):
331-
key = "use_{}".format(name.split("_")[0])
332-
self.__dict__[key] = True
333-
334+
334335

335336

336337
def ExecuteCMD(self, cmd, raise_error = False, return_output = False, on_cluster = False):

0 commit comments

Comments
 (0)