aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-06-17 20:22:28 +0200
committerMattias Andrée <maandree@operamail.com>2013-06-17 20:22:28 +0200
commit641d7a2b830f7455dbf3ee0228ff41fc79f08052 (patch)
tree454fdf728f2858b4c15317f490075d5769ead820
parentm (diff)
downloadargparser-641d7a2b830f7455dbf3ee0228ff41fc79f08052.tar.gz
argparser-641d7a2b830f7455dbf3ee0228ff41fc79f08052.tar.bz2
argparser-641d7a2b830f7455dbf3ee0228ff41fc79f08052.tar.xz
m doc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/argparser.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/argparser.py b/src/argparser.py
index d2078b2..618987c 100644
--- a/src/argparser.py
+++ b/src/argparser.py
@@ -70,6 +70,12 @@ class ArgParser():
@staticmethod
def parent_name(levels = 1):
+ '''
+ Gets the name of the parent process
+
+ @param levels:int The number of parents to walk, 0 for self, and 1 for direct parent
+ @return :str? The name of the parent process, `None` if not found
+ '''
pid = os.readlink('/proc/self')
lvl = levels
while lvl > 1: