Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mb makehashes doesn't work with very old Python #85

poeml opened this issue Jun 5, 2015 · 0 comments

mb makehashes doesn't work with very old Python #85

poeml opened this issue Jun 5, 2015 · 0 comments


Copy link

@poeml poeml commented Jun 5, 2015

                                                                               [          ]

Issue migrated (2015-06-05) from old issue tracker

Title    mb makehashes doesn't work with very old Python
 Priority   bug              Status        resolved
Superseder                  Nosy List      poeml
Assigned To poeml           Keywords

msg326 (view) Author: poeml Date: 2011-03-02.20:25:21

mb makehashes fails on SUSE SLES10, where SHA256 is not available.

The following patch should fix this:

Index: mb/mb/

--- mb/mb/ (revision 8239)
+++ mb/mb/ (working copy)
@@ -455,7 +455,7 @@
'12:piece length', 'i', str(self.chunk_size), 'e',
'6:pieces', str(len(self.pieces) * SHA1_DIGESTSIZE), ':',
'4:sha1', str(SHA1_DIGESTSIZE), ':', self.sha1,

  •             '6:sha256', str(SHA256_DIGESTSIZE), ':', self.sha256,
  •             '6:sha256', str(SHA256_DIGESTSIZE), ':', self.sha256 or '',
       h = sha1.sha1()
msg327 (view) Author: poeml Date: 2011-03-02.20:25:55

backtrace was:

File "/usr/bin/mb", line 1638, in ?
  r = mirrordoctor.main()
File "/usr/lib64/python2.4/site-packages/", line 257, in main
  return self.cmd(args)
File "/usr/lib64/python2.4/site-packages/", line 280, in cmd
  retval = self.onecmd(argv)
File "/usr/lib64/python2.4/site-packages/", line 412, in onecmd
  return self._dispatch_cmd(handler, argv)
File "/usr/lib64/python2.4/site-packages/", line 1100, in

return handler(argv[0], opts, *args)
File "/usr/bin/mb", line 1101, in do_makehashes
File "/usr/lib64/python2.4/site-packages/mb/", line 90, in check_file
File "/usr/lib64/python2.4/site-packages/mb/", line 311, in fill
File "/usr/lib64/python2.4/site-packages/mb/", line 462, in calc_btih
TypeError: sequence item 28: expected string, NoneType found

msg328 (view) Author: poeml Date: 2011-03-02.20:27:40

proposed fix in trunk:

msg348 (view) Author: poeml Date: 2012-02-20.23:59:57

In 2.16.0.

         Date         User  Action            Args
2012-02-20 23:59:57 poeml set    status: testing -> resolved
                                   messages: + msg348
2011-03-02 20:27:40 poeml set    messages: + msg328
2011-03-02 20:25:55 poeml set    messages: + msg327
2011-03-02 20:25:22 poeml create

(end of migrated issue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant