Re: [StGit PATCH] compressed import v3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Karl Hasselström wrote:
> On 2008-06-13 09:53:49 -0500, Clark Williams wrote:
> 
>> I'm interested to hear how you'd condense the code in
>> __gethandleandname().
> 
> Like this, for example:
> 
>     import bz2, gzip
>     for copen, ext in [(gzip.open, '.gz'), (bz2.BZ2File, '.bz2')]:
>         try:
>             f = copen(filename)
>             f.read(1)
>             f.seek(0)
>             return (f, __mkpatchname(filename, ext))
>         except IOError, e:
>             pass
> 
> If you don't mind, I'll just fix that up directly in your patch. (I
> also took the liberty to rename the function to __get_handle_and_name,
> since that's more consistent with other functions in that file.)
> 

Ah, that's very nice. Your changes work for me.

Clark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkhT6G8ACgkQqA4JVb61b9cCeQCfedD0BjOeRa3sbGvkRNe2BPMq
6roAoJE7klMbgymRCJ3B+pEjzgnTWO2l
=uZ+n
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux