[pitivi] build: Accept only a list in FlatpakPackage.run_app



commit 7f086cb91fe8ef2d7b768be1a05061962379d0ac
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Tue Oct 25 12:57:23 2016 +0200

    build: Accept only a list in FlatpakPackage.run_app
    
    Reviewed-by: Thibault Saunier <tsaunier gnome org>
    Differential Revision: https://phabricator.freedesktop.org/D1464

 build/flatpak/pitivi-flatpak |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/build/flatpak/pitivi-flatpak b/build/flatpak/pitivi-flatpak
index fff787e..3d19933 100755
--- a/build/flatpak/pitivi-flatpak
+++ b/build/flatpak/pitivi-flatpak
@@ -268,6 +268,7 @@ class FlatpakRepo(FlatpakObject):  # pylint: disable=too-few-public-methods
 
 
 class FlatpakPackage(FlatpakObject):
+    """A flatpak app."""
 
     def __init__(self, name, branch, repo, arch, user=True):  # pylint: disable=too-many-arguments
         FlatpakObject.__init__(self, user=user)
@@ -309,10 +310,8 @@ class FlatpakPackage(FlatpakObject):
         self.flatpak("update", self.name, self.branch, show_output=True,
                      comment="Updating %s" % self.name)
 
-    def run_app(self, args):
-        if not isinstance(args, list):
-            args = [args]
-
+    def run_app(self, *args):
+        """Starts the app represented by this instance."""
         self.flatpak("run", "--branch=" + self.branch, self.name, *args,
                      show_output=True,
                      comment="Running %s (%s)" % (self.name, self.branch))
@@ -446,7 +445,7 @@ class PitiviFlatpak:  # pylint: disable=too-many-instance-attributes
 
         if not self.devel:
             self.install_all()
-            self.app.run_app(self.args)
+            self.app.run_app(*self.args)
 
     def update_bundle(self):
         if not os.path.exists(self.prefix):


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