Skip to content

Commit 583448d

Browse files
committed
fixing parsing bug with singularity cli
currently, it is assumed the comments and sections come after the header. However, we need to allow comments before because it is not unheard of (although it seems rare) Signed-off-by: vsoch <[email protected]>
1 parent 3ac8045 commit 583448d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ The client here will eventually be released as "spython" (and eventually to
1717
singularity on pypi), and the versions here will coincide with these releases.
1818

1919
## [master](https://github.com/singularityhub/singularity-cli/tree/master)
20-
- ensure options and args from instance init are honored (0.0.15)
21-
- choose output for stream_command (0.0.14)
20+
- fixing bug with defining comments earlier (0.1.16)
21+
- ensure options and args from instance init are honored (0.1.15)
22+
- choose output for stream_command (0.1.14)
2223
- adding support to pull from a url (0.1.13)
2324
- add more verbosity to instance start/stop (0.1.12)
2425
- adding more verbosity to running commands (0.1.11)

spython/main/parse/parsers/singularity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,8 @@ def load_recipe(self):
304304
lines = self.lines[:]
305305
fromHeader = None
306306
stage = None
307+
section = None
308+
comments = []
307309

308310
while lines:
309311

@@ -314,8 +316,6 @@ def load_recipe(self):
314316
# Bootstrap Line
315317
if re.search("bootstrap", line, re.IGNORECASE):
316318
self._check_bootstrap(stripped)
317-
section = None
318-
comments = []
319319

320320
# From Line
321321
elif re.search("from:", stripped, re.IGNORECASE):

spython/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

77

8-
__version__ = "0.1.15"
8+
__version__ = "0.1.16"
99
AUTHOR = "Vanessa Sochat"
1010
AUTHOR_EMAIL = "[email protected]"
1111
NAME = "spython"

0 commit comments

Comments
 (0)