~evfool/software-center/lp626037

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/app.py

  • Committer: Gary Lasker
  • Date: 2012-05-08 04:57:33 UTC
  • mfrom: (2989.2.8 5.2)
  • Revision ID: gary.lasker@canonical.com-20120508045733-56izfccd4hj3fcvv
merge the 5.2 branch lp:software-center/5.2 to grab the current set of fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1240
1240
                if not request.startswith('/'):
1241
1241
                # we may have been given a relative path
1242
1242
                    request = os.path.join(os.getcwd(), request)
1243
 
                app = DebFileApplication(request)
 
1243
                try:
 
1244
                    app = DebFileApplication(request)
 
1245
                except ValueError as e:
 
1246
                    LOG.error("can not open %s: %s" % (request, e))
 
1247
                    from softwarecenter.ui.gtk3.dialogs import error
 
1248
                    error(None,
 
1249
                          _("Error"),
 
1250
                          _("The file “%s” could not be opened.") % request)
 
1251
                    app = None
1244
1252
            else:
1245
1253
                # package from archive
1246
1254
                # if there is a "/" in the string consider it as tuple
1261
1269
                else:
1262
1270
                    self.available_pane.init_view()
1263
1271
                    self.available_pane.show_app(app)
1264
 
            show_app(self, app)
1265
 
            return
 
1272
            if app:
 
1273
                show_app(self, app)
 
1274
                return
1266
1275
        elif len(packages) > 1:
1267
1276
            # turn multiple packages into a search with ","
1268
1277
            self.available_pane.init_view()