1
diff --git a/src/sugar/activity/bundlebuilder.py b/src/sugar/activity/bundlebuilder.py
2
--- a/src/sugar/activity/bundlebuilder.py
3
+++ b/src/sugar/activity/bundlebuilder.py
4
@@ -120,6 +120,7 @@ class Builder(object):
5
retcode = subprocess.call(args)
7
print 'ERROR - msgfmt failed with return code %i.' % retcode
10
cat = gettext.GNUTranslations(open(mo_file, 'r'))
11
translated_name = cat.gettext(self.config.activity_name)
12
@@ -132,7 +133,7 @@ class Builder(object):
13
files = self.config.bundle.get_files()
16
- logging.error('No files found, fixing the MANIFEST.')
17
+ logging.warn('No files found, fixing the MANIFEST.')
19
files = self.config.bundle.get_files()
21
@@ -258,8 +259,9 @@ def cmd_dev(config, args):
22
'''Setup for development'''
25
+ print 'ERROR - Wrong argument.'
26
print 'Usage: %prog dev'
30
bundle_path = env.get_user_activities_path()
31
if not os.path.isdir(bundle_path):
32
@@ -272,13 +274,15 @@ def cmd_dev(config, args):
33
print 'ERROR - The bundle has been already setup for development.'
35
print 'ERROR - A bundle with the same name is already installed.'
38
def cmd_dist_xo(config, args):
39
'''Create a xo bundle package'''
42
+ print 'ERROR - Wrong argument.'
43
print 'Usage: %prog dist_xo'
47
packager = XOPackager(Builder(config))
49
@@ -287,8 +291,9 @@ def cmd_fix_manifest(config, args):
50
'''Add missing files to the manifest'''
53
+ print 'ERROR - Wrong argument.'
54
print 'Usage: %prog fix_manifest'
58
builder = Builder(config)
59
builder.fix_manifest()
60
@@ -297,8 +302,9 @@ def cmd_dist_source(config, args):
61
'''Create a tar source package'''
64
+ print 'ERROR - Wrong argument.'
65
print 'Usage: %prog dist_source'
69
packager = SourcePackager(config)
71
@@ -311,8 +317,9 @@ def cmd_install(config, args):
72
help='Prefix to install files to')
73
(suboptions, subargs) = parser.parse_args(args)
75
+ print 'ERROR - Wrong argument.'
80
installer = Installer(Builder(config))
81
installer.install(suboptions.prefix)
82
@@ -321,8 +328,9 @@ def cmd_genpot(config, args):
83
'''Generate the gettext pot file'''
86
+ print 'ERROR - Wrong argument.'
87
print 'Usage: %prog genpot'
91
po_path = os.path.join(config.source_dir, 'po')
92
if not os.path.isdir(po_path):
93
@@ -354,22 +362,24 @@ def cmd_genpot(config, args):
94
retcode = subprocess.call(args)
96
print 'ERROR - xgettext failed with return code %i.' % retcode
99
def cmd_release(config, args):
100
'''Do a new release of the bundle'''
103
+ print 'ERROR - Wrong argument.'
104
print 'Usage: %prog release'
108
if not os.path.isdir('.git'):
109
print 'ERROR - this command works only for git repositories'
113
retcode = subprocess.call(['git', 'pull'])
115
print 'ERROR - cannot pull from git'
119
print 'Bumping activity version...'
121
@@ -440,22 +450,22 @@ def cmd_release(config, args):
122
retcode = subprocess.call(['git', 'commit', '-a', '-m % s' % changelog])
124
print 'ERROR - cannot commit to git'
128
retcode = subprocess.call(['git', 'tag', 'v%s' % version])
130
print 'ERROR - cannot tag the commit'
134
retcode = subprocess.call(['git', 'push'])
136
print 'ERROR - cannot push to git'
140
retcode = subprocess.call(['git', 'push', '--tags'])
142
print 'ERROR - cannot push tags to git'
148
@@ -463,8 +473,9 @@ def cmd_build(config, args):
149
'''Build generated files'''
152
+ print 'ERROR - Wrong argument.'
153
print 'Usage: %prog build'
157
builder = Builder(config)
159
@@ -492,7 +503,9 @@ def start(bundle_name=None):
161
globals()['cmd_' + args[0]](config, args[1:])
162
except (KeyError, IndexError):
163
+ print 'ERROR - Wrong command or argument.'
167
if __name__ == '__main__':