public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/base/, catalyst/, catalyst/targets/
Date: Tue,  6 Oct 2015 15:31:26 +0000 (UTC)	[thread overview]
Message-ID: <1444139832.d5fc0982052ada0eaab209b8c56574220f63a698.vapier@gentoo> (raw)

commit:     d5fc0982052ada0eaab209b8c56574220f63a698
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  6 13:57:12 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Oct  6 13:57:12 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d5fc0982

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.

 catalyst/base/stagebase.py   | 3 ++-
 catalyst/lock.py             | 9 ++++++---
 catalyst/targets/snapshot.py | 3 ++-
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index b9dd1d5..409fcab 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1695,7 +1695,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.unbind()
 				raise CatalystError("build aborting due to livecd_update error.")
 
-	def _debug_pause_(self):
+	@staticmethod
+	def _debug_pause_():
 		py_input("press any key to continue: ")
 
 # vim: ts=4 sw=4 sta et sts=4 ai

diff --git a/catalyst/lock.py b/catalyst/lock.py
index 71918d6..01b1aa8 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
 

diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
index 87340b7..a117a21 100644
--- a/catalyst/targets/snapshot.py
+++ b/catalyst/targets/snapshot.py
@@ -90,7 +90,8 @@ class snapshot(TargetBase, GenBase):
 	def kill_chroot_pids(self):
 		pass
 
-	def cleanup(self):
+	@staticmethod
+	def cleanup():
 		print "Cleaning up..."
 
 	def purge(self):


             reply	other threads:[~2015-10-06 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 15:31 Mike Frysinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-09-06 21:18 [gentoo-commits] proj/catalyst:pending commit in: catalyst/, catalyst/targets/, catalyst/base/ Brian Dolbec
2015-09-06 21:21 ` [gentoo-commits] proj/catalyst:master commit in: catalyst/base/, catalyst/, catalyst/targets/ Brian Dolbec
2015-01-01  5:59 [gentoo-commits] proj/catalyst:pending commit in: catalyst/, catalyst/base/, catalyst/targets/ Brian Dolbec
2015-02-26 20:12 ` [gentoo-commits] proj/catalyst:master commit in: catalyst/base/, catalyst/, catalyst/targets/ Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444139832.d5fc0982052ada0eaab209b8c56574220f63a698.vapier@gentoo \
    --to=vapier@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox