Skip to content

Commit de014da

Browse files
committed
Fix #179: make save_blueprint desc=@auto use existing app description
1 parent 2481f97 commit de014da

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

modules/cfg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
prog = 'ravshello'
77

88
# Version info
9-
__version__ = '1.30.0'
10-
__date__ = '2017/07/31'
9+
__version__ = '1.30.1'
10+
__date__ = '2017/08/11'
1111
version = "{} v{} last mod {}".format(prog, __version__, __date__)
1212

1313
# Defaults

modules/user_interface.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,20 +2301,20 @@ def ui_command_save_blueprint(self, name='@prompt', desc='@prompt', shutdown='tr
23012301
name = bpName
23022302
elif name == '@auto':
23032303
name = bpName
2304+
tagCreatedWithByFrom = "[Created w/{} {} by {} from app '{}']".format(cfg.prog, cfg.__version__, user, self.appName)
23042305
# Ensure there's not already a bp with that name
23052306
if not allowExactName:
23062307
name = ravello_sdk.new_name(rCache.get_bps(myOrgOnly=True), name + '_')
23072308
if desc == '@prompt':
23082309
desc = raw_input(c.CYAN("\nOptionally enter a description for your new app: "))
23092310
if len(desc):
2310-
desc += ' '
2311+
desc += " {}".format(tagCreatedWithByFrom)
23112312
else:
2312-
desc = ''
2313+
desc = tagCreatedWithByFrom
23132314
elif desc == '@auto':
2314-
desc = ''
2315+
desc = rCache.get_app(self.appId)['description']
23152316
else:
2316-
desc += ' '
2317-
desc += "[Created w/{} {} by {} from app '{}']".format(cfg.prog, cfg.__version__, user, self.appName)
2317+
desc += " {}".format(tagCreatedWithByFrom)
23182318
req = {'applicationId': self.appId, 'blueprintName': name, 'offline': shutdown, 'description': desc}
23192319
print(c.yellow("\nSaving blueprint from application . . . "), end="")
23202320
stdout.flush()

0 commit comments

Comments
 (0)