hgview #182147 Wrong claim about old urwid version (with patch) [open]

(tested on hgview-debian-version-1.7.1-2)

There is simple error in urwid version checking, which results in:

$ hg hgview --interface=curses abort: The "curses" interface could not be use with old urwid version ()1.1.1 < 1.0.0.Use the"raw" interface

(as you see, I have urwid 1.1.1, but hgview claims it is too old)

The following simple fix resolves the issue (and also corrects improper parens in the message above):

diff --git a/hgviewlib/curses/application.py b/hgviewlib/curses/application.py
--- a/hgviewlib/curses/application.py
+++ b/hgviewlib/curses/application.py
@@ -59,9 +59,9 @@
     def get_screen(self):
         """return the screen instance to use"""
         if self.opts.interface == 'curses' and \
-            map(int, URWID_VERSION.split('.')) < (1,0,0):
+            tuple(map(int, URWID_VERSION.split('.'))) < (1,0,0):
             raise ApplicationError('The "curses" interface could not be use '
-                                   'with old urwid version ()%s < 1.0.0.'
+                                   'with old urwid version (%s < 1.0.0).'
                                    'Use the"raw" interface' %
         if self.opts.interface == 'raw':
done in<not specified>
closed by<not specified>