bodhi/buildsys.py | 3 ++- bodhi/closure.py | 2 +- bodhi/model.py | 13 +++++++++---- bodhi/modifyrepo.py | 2 +- bodhi/tests/test_buildsystem.py | 4 +++- bodhi/tests/test_util.py | 5 ++++- bodhi/tools/client.py | 6 +++++- 7 files changed, 25 insertions(+), 10 deletions(-)
New commits: commit 400a911e157b4bbec5d9fcb2b38d23f2415b181b Author: Till Maas opensource@till.name Date: Sun Aug 22 13:16:54 2010 +0200
Mark anonymous karma as ignored
Bodhi ticket: https://fedorahosted.org/bodhi/ticket/470
diff --git a/bodhi/model.py b/bodhi/model.py index a0bd626..0d55fa3 100644 --- a/bodhi/model.py +++ b/bodhi/model.py @@ -635,11 +635,13 @@ class PackageUpdate(SQLObject): for comment in self.comments: if comment.anonymous: anonymous = " (unauthenticated)" + ignored = " (ignored)" else: anonymous = "" - comments.append(u"%s%s%s - %s (karma %s)" % (' ' * 13, + ignored = "" + comments.append(u"%s%s%s - %s (karma %s%s)" % (' ' * 13, comment.author, anonymous, comment.timestamp, - comment.karma)) + comment.karma, ignored)) if comment.text: text = wrap(comment.text, initial_indent=' ' * 13, subsequent_indent=' ' * 13, width=67) @@ -1109,10 +1111,13 @@ class Comment(SQLObject): karma = '%+d' % (self.karma,) if self.anonymous: anonymous = " (unauthenticated)" + ignored = " (ignored)" else: anonymous = "" - return "%s%s - %s (karma: %s)\n%s" % (self.author, anonymous, - self.timestamp, karma, self.text) + ignored = "" + return "%s%s - %s (karma: %s%s)\n%s" % (self.author, anonymous, + self.timestamp, karma, ignored, + self.text)
def __json__(self): return dict(author=self.author, text=self.text,
commit 47a53abd52ea17b9d730c0c456be884ee8879763 Author: Till Maas opensource@till.name Date: Sun Aug 22 13:30:07 2010 +0200
Add bodhi-url command line option to client
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py index 8488263..0d5ae24 100755 --- a/bodhi/tools/client.py +++ b/bodhi/tools/client.py @@ -125,6 +125,10 @@ def get_parser(): default=60, help="Maximum number of updates to return " "(default: 60)")
+ ## Expert options + parser.add_option("", "--bodhi-url", type="string", + help="Bodhi url to use for testing purposes (default: %s)" % + BODHI_URL, dest="bodhi_url", default=BODHI_URL) return parser
def setup_logger(verbose): @@ -142,7 +146,7 @@ def main(): opts, args = parser.parse_args() setup_logger(opts.verbose)
- bodhi = BodhiClient(BODHI_URL, username=opts.username, debug=opts.verbose) + bodhi = BodhiClient(opts.bodhi_url, username=opts.username, debug=opts.verbose)
def verify_args(args): if not args and len(args) != 1:
commit 65081bfd0a4319ccf3acf4c2827b2fc3dbf2aa63 Author: Steve 'Ashcrow' Milner smilner@redhat.com Date: Sun Oct 12 20:28:09 2008 -0400
use newstyle classes where possible
diff --git a/bodhi/buildsys.py b/bodhi/buildsys.py index 55244bd..d4ce7f0 100644 --- a/bodhi/buildsys.py +++ b/bodhi/buildsys.py @@ -24,7 +24,8 @@ log = logging.getLogger(__name__) ## of our Buildsystem class. session = None
-class Buildsystem: + +class Buildsystem(object): """ The parent for our buildsystem. Not only does this help us keep track of the functionality that we expect from our buildsystem, but it also alows diff --git a/bodhi/closure.py b/bodhi/closure.py index 03b28db..437d0a6 100644 --- a/bodhi/closure.py +++ b/bodhi/closure.py @@ -70,7 +70,7 @@ baseurl=file://%(testrepo)s/testing/%(rel)s/%(arch)s enabled=%(testing)s """
-class TestRepoClosure: +class TestRepoClosure(object):
def __init__(self, updates): self.updates = updates diff --git a/bodhi/modifyrepo.py b/bodhi/modifyrepo.py index 5be6400..cb39ec0 100644 --- a/bodhi/modifyrepo.py +++ b/bodhi/modifyrepo.py @@ -32,7 +32,7 @@ from hashlib import sha1 as sha from xml.dom import minidom from bodhi.exceptions import RepositoryNotFound
-class RepoMetadata: +class RepoMetadata(object):
def __init__(self, repo): """ Parses the repomd.xml file existing in the given repo directory. """ diff --git a/bodhi/tests/test_buildsystem.py b/bodhi/tests/test_buildsystem.py index e007606..6521745 100644 --- a/bodhi/tests/test_buildsystem.py +++ b/bodhi/tests/test_buildsystem.py @@ -3,10 +3,12 @@ import turbogears from turbogears import config, database
+ turbogears.update_config(configfile='bodhi.cfg', modulename='bodhi.config') database.set_db_uri("sqlite:///:memory:")
-class TestBuildsystem: + +class TestBuildsystem(object):
def test_valid_buildsys(self): buildsys = config.get('buildsystem') diff --git a/bodhi/tests/test_util.py b/bodhi/tests/test_util.py index f461873..056537b 100644 --- a/bodhi/tests/test_util.py +++ b/bodhi/tests/test_util.py @@ -7,12 +7,15 @@ from turbogears import config, update_config, database from bodhi.util import Singleton, sanity_check_repodata, mkmetadatadir
import logging + + log = logging.getLogger(__name__)
update_config(configfile='bodhi.cfg', modulename='bodhi.config') database.set_db_uri("sqlite:///:memory:")
-class TestUtil: + +class TestUtil(object):
def test_singleton(self): """ Make sure our Singleton class actually works """