Hoa Nguyen has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/66091?usp=email )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)Change subject: stdlib: More helpful message for the filelock error
......................................................................
stdlib: More helpful message for the filelock error
Change-Id: Ib8e3bc9fc145a9604670e8288209ac62bfbd7932
Signed-off-by: Hoa Nguyen <hoangu...@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66091
Maintainer: Bobby Bruce <bbr...@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbr...@ucdavis.edu>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/python/gem5/utils/filelock.py
1 file changed, 26 insertions(+), 2 deletions(-)
Approvals:
kokoro: Regressions pass
Bobby Bruce: Looks good to me, approved; Looks good to me, approved
diff --git a/src/python/gem5/utils/filelock.py
b/src/python/gem5/utils/filelock.py
index 82e1122..a6798e9 100644
--- a/src/python/gem5/utils/filelock.py
+++ b/src/python/gem5/utils/filelock.py
@@ -69,12 +69,22 @@
except OSError as e:
if e.errno != errno.EEXIST:
raise
+ solution_message = (
+ "This is likely due to the existence"
+ " of the lock file '{}'. If there's no other process"
+ " the lock file, you can manually delete the lock file
and"
+ " rerun the script.".format(self.lockfile)
+ )
if self.timeout is None:
raise FileLockException(
- "Could not acquire lock on
{}".format(self.file_name)
+ "Could not acquire lock on {}. {}".format(
+ self.file_name, solution_message
+ )
)
if (time.time() - start_time) >= self.timeout:
- raise FileLockException("Timeout occured.")
+ raise FileLockException(
+ "Timeout occured. {}".format(solution_message)
+ )
time.sleep(self.delay)
# self.is_locked = True
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/66091?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ib8e3bc9fc145a9604670e8288209ac62bfbd7932
Gerrit-Change-Number: 66091
Gerrit-PatchSet: 3
Gerrit-Owner: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org