Gentoo Archives: gentoo-commits

From: "André Erdmann" <dywi@×××××××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/util/
Date: Sat, 23 Aug 2014 19:03:13
Message-Id: 1408814393.cb26f0710d0b0559fb0e596e78d308c015c508da.dywi@gentoo
1 commit: cb26f0710d0b0559fb0e596e78d308c015c508da
2 Author: André Erdmann <dywi <AT> mailerd <DOT> de>
3 AuthorDate: Sat Aug 23 17:19:53 2014 +0000
4 Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
5 CommitDate: Sat Aug 23 17:19:53 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=cb26f071
7
8 minor cleanup
9
10 ---
11 roverlay/util/dictwalk.py | 4 ++--
12 roverlay/util/objects.py | 8 ++++----
13 2 files changed, 6 insertions(+), 6 deletions(-)
14
15 diff --git a/roverlay/util/dictwalk.py b/roverlay/util/dictwalk.py
16 index 0813d11..9408623 100644
17 --- a/roverlay/util/dictwalk.py
18 +++ b/roverlay/util/dictwalk.py
19 @@ -30,8 +30,8 @@ def dictmerge ( iterable, dict_cls=dict, get_key=None, get_value=None ):
20
21
22 def dictwalk_create_parent_v ( root, path, dict_create=None, cautious=True ):
23 - """Creates a dict tree structure using keys the given path. The last path
24 - element will not be created.
25 + """Creates a dict tree structure using keys from the given path.
26 + The last path element will not be created.
27
28 Returns a 3-tuple
29 ( <parent of the last path element>,
30
31 diff --git a/roverlay/util/objects.py b/roverlay/util/objects.py
32 index 9c73749..0f2a2da 100644
33 --- a/roverlay/util/objects.py
34 +++ b/roverlay/util/objects.py
35 @@ -59,13 +59,13 @@ class SafeWeakRef ( weakref.ref ):
36
37 def __repr__ ( self ):
38 obj = self.deref_unsafe()
39 - if obj:
40 - return "<{} at 0x{:x} to {!r} at 0x{:x}>".format (
41 + if obj is not None:
42 + return "<{} at {:#x} to {!r} at {:#x}>".format (
43 self.__class__.__name__, id ( self ),
44 obj.__class__.__name__, id ( obj )
45 )
46 else:
47 - return "<{} at 0x{:x} to None>".format (
48 + return "<{} at {:#x} to None>".format (
49 self.__class__.__name__, id ( self )
50 )
51 # --- end of __repr__ (...) ---
52 @@ -109,7 +109,7 @@ class NoneRef ( object ):
53 __nonzero__ = __bool__
54
55 def __repr__ ( self ):
56 - return "<NoneRef at 0x{:x}>".format ( id ( self ) )
57 + return "<NoneRef at {:#x}>".format ( id ( self ) )
58 # --- end of __repr__ (...) ---
59
60 # --- end of NoneRef ---