[Sugar-devel] Fwd: [sugar-toolkit-gtk3] Add a testing method to open a activity with a uri (e2c20bb)

Gonzalo Odiard godiard at gmail.com
Mon Aug 4 16:56:59 EDT 2014


Gaurav,

What you think about this?

---------- Forwarded message ----------
From: Martin Abente Lahaye <notifications at github.com>
Date: Mon, Aug 4, 2014 at 3:27 PM
Subject: Re: [sugar-toolkit-gtk3] Add a testing method to open a activity
with a uri (e2c20bb)
To: godiard/sugar-toolkit-gtk3 <sugar-toolkit-gtk3 at noreply.github.com>
Cc: Gonzalo Odiard <godiard at gmail.com>


What do you think about extending run_activity with an extra "options"
parameter, like:

def run_activity(self, options=None):
    ...
    cmd = ["sugar-launch", self.bundle_id]
    if options is not None:
        cmd += options
    process = subprocess.Popen(cmd)
    ...

Then, we don't need to repeat most of the run_activity code elsewhere, we
can cover other options in the future, and run_activity_with_uri can be
re-factored as:

def run_activity_with_uri(self, uri):
    self.run_activity(['--uri', uri])

--
Reply to this email directly or view it on GitHub
<https://github.com/godiard/sugar-toolkit-gtk3/commit/e2c20bbc1c02506d229ff50b1e813e4321f78609#commitcomment-7258427>
.



-- 
Gonzalo Odiard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140804/2765881b/attachment.html>


More information about the Sugar-devel mailing list