Merge lp:~denimnumber1/quickly/quickly into lp:quickly

Proposed by Dennis Kowalski
Status: Merged
Merged at revision: 679
Proposed branch: lp:~denimnumber1/quickly/quickly
Merge into: lp:quickly
Diff against target: 18 lines (+8/-0)
1 file modified
quickly/api.py (+8/-0)
To merge this branch: bzr merge lp:~denimnumber1/quickly/quickly
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Review via email: mp+115066@code.launchpad.net

Description of the change

Add get_current_name() func to quickly api.
To get project name from path.

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Looks good (on the model of get_current_template), thanks a lot for your contribution to Quickly. Merging it :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'quickly/api.py'
2--- quickly/api.py 2010-08-13 15:50:57 +0000
3+++ quickly/api.py 2012-07-16 05:43:20 +0000
4@@ -90,6 +90,14 @@
5 return configurationhandler.project_config['template']
6 except KeyError:
7 return None
8+
9+def get_current_name(path=None):
10+ '''return project name if we are in a project'''
11+ configurationhandler.loadConfig(can_stop=False, config_file_path=path)
12+ try:
13+ return configurationhandler.project_config['project']
14+ except KeyError:
15+ return None
16
17 def list_template_for_command(command_name):
18 '''from the command_name, return all templates containing it'''

Subscribers

People subscribed via source and target branches