Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Snap yaml #215
Conversation
kyrofa
reviewed
Jan 11, 2016
| - # TODO talk to original author if the exception to be captured here is | ||
| - # FileNotFoundError, the original code was a general catch all | ||
| - try: | ||
| + with contextlib.suppress(FileNotFoundError): |
kyrofa
Jan 11, 2016
Member
Would it be more clear if you simply checked for the presence of the file before removing it?
|
This looks good to me. |
elopio
reviewed
Jan 11, 2016
| @@ -89,6 +89,7 @@ def main(): | ||
| try: | ||
| commands.load(args['COMMAND']).main(argv=args['ARGS']) | ||
| except Exception as e: | ||
| + raise e |
elopio
reviewed
Jan 11, 2016
| @@ -1,6 +1,6 @@ | ||
| # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | ||
| # | ||
| -# Copyright (C) 2015-2016 Canonical Ltd | ||
| +# Copyright (C) 2016 Canonical Ltd |
elopio
Jan 11, 2016
Member
Why did you remove the 2015? It should have all the years that were touched.
sergiusens
Jan 11, 2016
Collaborator
because, not sure how it worked, but I moved meta.py to meta_legacy.py and created a new meta.py which only has 2016 things in it.
elopio
reviewed
Jan 11, 2016
| - | ||
| - Returns meta_dir. | ||
| - ''' | ||
| + """Creates snap.yaml and necessary package hooks. |
elopio
reviewed
Jan 11, 2016
| +def _copy(meta_dir, relpath, new_relpath=None): | ||
| + new_base = new_relpath or os.path.basename(relpath) | ||
| + new_relpath = os.path.join(meta_dir, new_base) |
elopio
reviewed
Jan 11, 2016
| + for app in apps: | ||
| + for k in [k for k in ('command', 'stop-command') if k in apps[app]]: | ||
| + execparts = shlex.split(apps[app][k]) | ||
| + apps[app][k] = _wrap_exe(execparts[0], args=execparts[1:]) |
elopio
reviewed
Jan 11, 2016
| @@ -27,331 +26,159 @@ | ||
| ) | ||
| -class ComposeTestCase(tests.TestCase): | ||
| +class Create(tests.TestCase): |
elopio
reviewed
Jan 11, 2016
| - call().__enter__(), | ||
| - call().__enter__().write('my summary\nmy description\n'), | ||
| - call().__exit__(None, None, None), | ||
| - ] |
|
We are missing examples of forking daemons. I'll report a bug for this. |
|
Looks good to me too. |
|
And bug reported about the forking: https://bugs.launchpad.net/snapcraft/+bug/1532853 |
added a commit
that referenced
this pull request
Jan 11, 2016
sergiusens
merged commit 89904e3
into
snapcore:master
Jan 11, 2016
sergiusens
deleted the
sergiusens:snap_yaml
branch
Jan 11, 2016
pushed a commit
to smoser/snapcraft
that referenced
this pull request
Sep 14, 2016
pushed a commit
to kalikiana/snapcraft
that referenced
this pull request
Apr 6, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sergiusens commentedJan 8, 2016
The documentation will be in a separate PR/commit
The bug this fixes is LP: #1532842