diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-10-06 09:57:12 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-10-06 09:57:12 -0400 |
commit | d5fc0982052ada0eaab209b8c56574220f63a698 (patch) | |
tree | 303dda9dd586f949bc131897780a06db8719c2ce /catalyst/lock.py | |
parent | lint: fix bad indentation (diff) | |
download | catalyst-d5fc0982052ada0eaab209b8c56574220f63a698.tar.gz catalyst-d5fc0982052ada0eaab209b8c56574220f63a698.tar.bz2 catalyst-d5fc0982052ada0eaab209b8c56574220f63a698.zip |
lint: convert funcs to @staticmethod where it makes sense
These functions don't actually utilize |self|, so make them into
@staticmethod's to quiet down the linter.
Diffstat (limited to 'catalyst/lock.py')
-rw-r--r-- | catalyst/lock.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/catalyst/lock.py b/catalyst/lock.py index 71918d64..01b1aa80 100644 --- a/catalyst/lock.py +++ b/catalyst/lock.py @@ -320,7 +320,8 @@ class LockDir(object): del self.hardlock_paths[self.lockdir] print self.hardlock_paths - def hardlock_name(self, path): + @staticmethod + def hardlock_name(path): mypath=path+"/.hardlock-"+os.uname()[1]+"-"+str(os.getpid()) newpath = os.path.normpath(mypath) if len(newpath) > 1: @@ -328,7 +329,8 @@ class LockDir(object): newpath = "/"+newpath.lstrip("/") return newpath - def hardlink_is_mine(self,link,lock): + @staticmethod + def hardlink_is_mine(link, lock): import stat try: myhls = os.stat(link) @@ -347,7 +349,8 @@ class LockDir(object): return True return False - def hardlink_active(self, lock): + @staticmethod + def hardlink_active(lock): if not os.path.exists(lock): return False |