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/
Date: Sun, 11 Oct 2015 17:26:38 +0000 (UTC)	[thread overview]
Message-ID: <1444542985.988f43379698cd76e8883a6bfffff0506a1b128d.vapier@gentoo> (raw)

commit:     988f43379698cd76e8883a6bfffff0506a1b128d
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 05:59:09 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 05:56:25 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=988f4337

resume: convert to log module

The AutoResumeError exception wasn't actually used as an exception --
it was never raised, only printed.  Throw it away in place of a plain
log message.

 catalyst/base/resume.py | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/catalyst/base/resume.py b/catalyst/base/resume.py
index 443b46d..99d8abc 100644
--- a/catalyst/base/resume.py
+++ b/catalyst/base/resume.py
@@ -12,27 +12,13 @@ set, unset, is_set, is_unset, enabled, clear_all
 '''
 
 import os
-import sys
-import traceback
 
 from snakeoil import fileutils
 
+from catalyst import log
 from catalyst.fileops import ensure_dirs, pjoin, listdir_files, clear_dir
 
 
-class AutoResumeError(Exception):
-	def __init__(self, message, print_traceback=False):
-		if message:
-			if print_traceback:
-				(_type, value) = sys.exc_info()[:2]
-				if value!=None:
-					print
-					print "Traceback values found.  listing..."
-					print traceback.print_exc(file=sys.stdout)
-			print "!!! catalyst: AutoResumeError " + message
-			print
-
-
 class AutoResume(object):
 	'''Class for tracking and handling all aspects of
 	the autoresume option and related files.
@@ -73,7 +59,7 @@ class AutoResume(object):
 				fileutils.touch(fname)
 				self._points[point] = fname
 			except Exception as e:
-				print AutoResumeError(str(e))
+				log.error('AutoResumeError: %s', e)
 				return False
 		return True
 
@@ -91,7 +77,7 @@ class AutoResume(object):
 				if data and no_lf:
 					data = data.replace('\n', '')
 			except OSError as e:
-				print AutoResumeError(str(e))
+				log.error('AutoResumeError: %s', e)
 				return None
 			return data
 		return None
@@ -109,7 +95,7 @@ class AutoResume(object):
 			os.unlink(self._points[point])
 			self._points.pop(point)
 		except Exception as e:
-			print AutoResumeError(str(e))
+			log.error('AutoResumeError: %s', e)
 			return False
 		return True
 


             reply	other threads:[~2015-10-11 17:26 UTC|newest]

Thread overview: 144+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-11 17:26 Mike Frysinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-13 20:33 [gentoo-commits] proj/catalyst:master commit in: catalyst/base/ Andreas K. Hüttel
2024-08-22 18:39 Ben Kohler
2024-08-03  9:06 Andreas K. Hüttel
2024-07-30 14:12 Andreas K. Hüttel
2024-07-30 11:06 Andreas K. Hüttel
2024-07-30 11:06 Andreas K. Hüttel
2024-06-09 16:50 Andreas K. Hüttel
2024-06-07 21:45 Matt Turner
2024-03-03 18:50 Andreas K. Hüttel
2023-12-24 21:42 Andreas K. Hüttel
2023-09-05  1:44 Andreas K. Hüttel
2023-07-01 19:27 Andreas K. Hüttel
2023-05-10 18:10 Ben Kohler
2022-11-22 21:19 Matt Turner
2022-11-20  0:21 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2022-05-13 17:45 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2022-11-20  0:21 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2022-04-20 23:26 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2022-11-14 14:11 Andreas K. Hüttel
2022-11-13  2:18 Andreas K. Hüttel
2022-05-13 17:45 Matt Turner
2022-05-13 17:45 Matt Turner
2022-05-13 17:43 [gentoo-commits] proj/catalyst:stage4-user-groups-fixes " Matt Turner
2022-05-13 17:45 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2022-04-02 23:50 Matt Turner
2021-06-10  0:48 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-02-21  2:05 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2021-06-10  0:48 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-03-09 16:18 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2021-06-10  0:48 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-03-25  3:03 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2021-06-10  0:48 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-02-20 21:27 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2021-03-25  3:03 Matt Turner
2021-03-06 16:58 Matt Turner
2021-01-28  2:41 Matt Turner
2021-01-28  2:41 Matt Turner
2021-01-28  2:09 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2021-01-28  2:41 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2021-01-18 19:53 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-12-27 23:15 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-12-19 19:56 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-10-30 22:41 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-10-30 22:41 Matt Turner
2020-10-30 22:41 Matt Turner
2020-10-24 22:07 Matt Turner
2020-10-24 22:07 Matt Turner
2020-10-14 17:48 Matt Turner
2020-08-15 21:11 Matt Turner
2020-07-24 20:33 Andreas K. Hüttel
2020-07-20 20:40 Andreas K. Hüttel
2020-06-05 21:13 Matt Turner
2020-06-05 21:13 Matt Turner
2020-06-05 21:13 Matt Turner
2020-05-21 20:25 Matt Turner
2020-05-21 20:25 Matt Turner
2020-05-21 20:25 Matt Turner
2020-05-20  3:39 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-05-21 20:25 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-16  6:43 Matt Turner
2020-05-16  6:43 Matt Turner
2020-05-15  6:32 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-05-16  6:43 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-15  6:32 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-05-16  6:43 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-06 17:41 Matt Turner
2020-05-05  5:20 Matt Turner
2020-05-01  5:57 Matt Turner
2020-04-30 22:56 Matt Turner
2020-04-23  2:06 Matt Turner
2020-04-22  5:52 Matt Turner
2020-04-18 20:30 Matt Turner
2020-04-17 19:52 Matt Turner
2020-04-17 19:52 Matt Turner
2020-04-17 19:52 Matt Turner
2020-04-17 19:52 Matt Turner
2020-04-15 19:59 Matt Turner
2020-04-13 20:43 Matt Turner
2020-04-13 20:43 Matt Turner
2020-04-13 20:43 Matt Turner
2020-04-13 20:36 Matt Turner
2020-04-13 20:36 Matt Turner
2020-04-13 20:36 Matt Turner
2020-04-10 21:04 Matt Turner
2020-04-10  5:38 Matt Turner
2020-04-10  2:11 Matt Turner
2020-03-29 17:48 Matt Turner
2020-03-28 20:07 Matt Turner
2019-10-19 23:25 Matt Turner
2019-10-14 20:15 Matt Turner
2019-10-05 22:31 Matt Turner
2018-11-07 19:50 Rick Farina
2018-10-01 16:30 Brian Dolbec
2018-07-21 18:54 Brian Dolbec
2018-07-21 18:54 Brian Dolbec
2018-02-22  3:53 Richard Farina
2018-02-22  3:50 Richard Farina
2017-12-29  2:27 Brian Dolbec
2017-12-29  2:27 Brian Dolbec
2017-12-29  0:35 Brian Dolbec
2017-11-29 17:20 Brian Dolbec
2017-11-29 17:20 Brian Dolbec
2017-11-22 15:52 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2017-11-29 17:20 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2017-03-09  5:38 Brian Dolbec
2017-03-09  5:05 Brian Dolbec
2017-03-08 23:16 Brian Dolbec
2017-03-08 23:16 Brian Dolbec
2016-09-19  3:27 Brian Dolbec
2016-06-25 15:46 Brian Dolbec
2016-05-22  3:34 Mike Frysinger
2016-05-20  3:03 Mike Frysinger
2016-03-24 14:37 Brian Dolbec
2016-03-23 21:15 Brian Dolbec
2016-03-21  4:55 Mike Frysinger
2016-03-17  5:04 Brian Dolbec
2016-02-17  8:17 Brian Dolbec
2016-02-11 16:43 Mike Frysinger
2016-02-11 13:59 Mike Frysinger
2015-12-23  4:30 Brian Dolbec
2015-12-20  4:47 Brian Dolbec
2015-12-20  1:13 Brian Dolbec
2015-12-15 17:13 Brian Dolbec
2015-11-21  1:33 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-11-10  6:42 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-11-20 21:26 Brian Dolbec
2015-11-09  4:47 Brian Dolbec
2015-10-31 20:35 Brian Dolbec
2015-10-31 20:35 Brian Dolbec
2015-10-28 16:50 Mike Frysinger
2015-10-27 21:43 Richard Farina
2015-10-24  6:58 Mike Frysinger
2015-10-24  6:58 Mike Frysinger
2015-10-11 18:03 Mike Frysinger
2015-10-11 17:26 Mike Frysinger
2015-10-11 17:26 Mike Frysinger
2015-10-09  2:40 Mike Frysinger
2015-10-06 17:03 Mike Frysinger
2015-10-06 15:31 Mike Frysinger
2015-10-06 13:46 Mike Frysinger
2015-09-08 14:21 Richard Farina
2015-09-08 14:17 Brian Dolbec
2015-09-08 14:17 Brian Dolbec
2015-09-08 14:14 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-09-08 14:17 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-09-06 21:18 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-09-06 21:21 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-09-03 15:14 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-09-02 21:00 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-09-02 21:52 Richard Farina
2015-09-02 21:25 Richard Farina
2015-09-01 19:41 Richard Farina
2015-08-31 19:21 Richard Farina
2015-05-24  0:08 Brian Dolbec
2015-05-24  0:08 Brian Dolbec
2015-05-24  0:08 Brian Dolbec
2015-05-21 23:53 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-05-24  0:08 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-05-21 23:53 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-05-24  0:08 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-05-21 23:53 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-05-24  0:08 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-02-26 22:18 Brian Dolbec
2015-01-01  5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 20:12 ` [gentoo-commits] proj/catalyst:master " 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=1444542985.988f43379698cd76e8883a6bfffff0506a1b128d.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