[debexpo-devel] GPG code refactoring (was: implement autobuilders)
Jonny Lamb
jonny at debian.org
Wed Feb 11 17:30:35 CET 2009
On Sun, Feb 08, 11:42:28 +0000, Serafeim Zanikolas wrote:
> Patch attached.
Thanks. Some comments:
* Please use new style classes (inherit from object).
* I don't like the way you instantiate a GnuPG object every time you
import debexpo.lib.utils. Let the controller who wants to use GPG do
that.
* Also, you can make error reporting and handling better if you do the
above comment and then raise some exceptions in the controllers
instead of just writing to the log file. This way, controllers can
create a GnuPG object, and know if calls will not be successful.
* Can you put the class into another file in debexpo.lib. gnupg.py, or
gpg.py perchance? I don't want to make files really long as they
become scary to people who don't know the code. :-)
* GnuPG._run: I assume opening "/tmp/blah" and writing out the command
and status was just a debugging line? :-)
* GnuPG.__init__: Instead of catching the KeyError, you can just use
config.get('debexpo.gpg_path'). Look at the documentation for
dict.get.
Thanks for your patch, especially for the test case. :-D
--
Jonny Lamb, UK
jonny at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://workaround.org/pipermail/debexpo-devel/attachments/20090211/3c7f2ebf/attachment.pgp>
More information about the debexpo-devel
mailing list