Skip to content

Commit

Permalink
Fix #179: make save_blueprint desc=@auto use existing app description
Browse files Browse the repository at this point in the history
  • Loading branch information
ryran committed Aug 11, 2017
1 parent 2481f97 commit de014da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions modules/cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
prog = 'ravshello'

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

# Defaults
Expand Down
10 changes: 5 additions & 5 deletions modules/user_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2301,20 +2301,20 @@ def ui_command_save_blueprint(self, name='@prompt', desc='@prompt', shutdown='tr
name = bpName
elif name == '@auto':
name = bpName
tagCreatedWithByFrom = "[Created w/{} {} by {} from app '{}']".format(cfg.prog, cfg.__version__, user, self.appName)
# Ensure there's not already a bp with that name
if not allowExactName:
name = ravello_sdk.new_name(rCache.get_bps(myOrgOnly=True), name + '_')
if desc == '@prompt':
desc = raw_input(c.CYAN("\nOptionally enter a description for your new app: "))
if len(desc):
desc += ' '
desc += " {}".format(tagCreatedWithByFrom)
else:
desc = ''
desc = tagCreatedWithByFrom
elif desc == '@auto':
desc = ''
desc = rCache.get_app(self.appId)['description']
else:
desc += ' '
desc += "[Created w/{} {} by {} from app '{}']".format(cfg.prog, cfg.__version__, user, self.appName)
desc += " {}".format(tagCreatedWithByFrom)
req = {'applicationId': self.appId, 'blueprintName': name, 'offline': shutdown, 'description': desc}
print(c.yellow("\nSaving blueprint from application . . . "), end="")
stdout.flush()
Expand Down

0 comments on commit de014da

Please sign in to comment.