hgview: properly format the URWID version error string (closes #262879)

The version is now a tuple. So format got confused about it. We enclose the tuple in a tuple to make it work.

authorPierre-Yves David <pierre-yves.david@fb.com>
changeset0d3255592dce
branchstable
phasepublic
hiddenno
parent revision#eeda244bf11d backout f1ef01d91b39 to prevent a traceback on the text version
child revision#14407b256085 [curses] backout version number change introduce in f093e1820f5d
files modified by this revision
hgviewlib/curses/application.py
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1407793604 25200
# Mon Aug 11 14:46:44 2014 -0700
# Branch stable
# Node ID 0d3255592dceb8a17148769e344584bff69e3fa9
# Parent eeda244bf11dd1711ef1eecb95eb4c4c30ced452
hgview: properly format the URWID version error string (closes #262879)

The version is now a tuple. So format got confused about it. We enclose the
tuple in a tuple to make it work.

diff --git a/hgviewlib/curses/application.py b/hgviewlib/curses/application.py
@@ -60,11 +60,11 @@
1          """return the screen instance to use"""
2          if self.opts.interface == 'curses' and URWID_VERSION < (1, 2, 0):
3              raise ApplicationError('The "curses" interface can not be used '
4                                     'with old installed urwid version '
5                                     '%s < 1.0.0. Use the "raw" interface'
6 -                                   % URWID_VERSION)
7 +                                   % (URWID_VERSION, ))
8          if self.opts.interface == 'raw':
9              from urwid.raw_display import Screen
10          elif self.opts.interface == 'curses':
11              from urwid.curses_display import Screen
12