projects
/
pyutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More work to improve documentation generated by sphinx. Also fixes
[pyutils.git]
/
src
/
pyutils
/
misc_utils.py
diff --git
a/src/pyutils/misc_utils.py
b/src/pyutils/misc_utils.py
index 669b3ef98a20d2b4144da67299c463f73ee46851..632f1796a80126fbcc3fb17a062dcb34acb8570f 100644
(file)
--- a/
src/pyutils/misc_utils.py
+++ b/
src/pyutils/misc_utils.py
@@
-9,7
+9,9
@@
import sys
def is_running_as_root() -> bool:
def is_running_as_root() -> bool:
- """Returns True if running as root.
+ """
+ Returns:
+ True if running as root, False otherwise.
>>> is_running_as_root()
False
>>> is_running_as_root()
False
@@
-18,8
+20,10
@@
def is_running_as_root() -> bool:
def debugger_is_attached() -> bool:
def debugger_is_attached() -> bool:
- """Return if the debugger is attached"""
-
+ """
+ Returns:
+ True if a debugger is attached, False otherwise.
+ """
gettrace = getattr(sys, 'gettrace', lambda: None)
return gettrace() is not None
gettrace = getattr(sys, 'gettrace', lambda: None)
return gettrace() is not None