The unified diff between revisions [8e272dc5..] and [3940066f..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'ChartInterface.py'

#
#
# patch "ChartInterface.py"
#  from [a648c3d362fc035a493a9e4e02a2553e009e32e7]
#    to [5dca41dbe38823c2d9a7e2c396c709c7c8fb03ac]
#
============================================================
--- ChartInterface.py	a648c3d362fc035a493a9e4e02a2553e009e32e7
+++ ChartInterface.py	5dca41dbe38823c2d9a7e2c396c709c7c8fb03ac
@@ -6,7 +6,7 @@ import shlex

 import sys
 import shlex
-import Chart
+from Chart import Chart
 from CLIParser import CLIParser, CLIParserError
 from States import *

@@ -77,6 +77,7 @@ class ChartInterface:
 		vstatus.change_state(STATE_CHART_IDLE, 1)

 	def create(self, state, event, params, v, vstatus):
+		vstatus.change_state(STATE_CHART_IDLE, 1)
 		args = shlex.split(self.input)
 		print args

@@ -98,26 +99,18 @@ class ChartInterface:
 		except CLIParserError:
 			print "command problem: %s" % (self.input,)

-		if not options.details or \
-			not options.debitbalance or \
-			not options.info:
+		if options.details is None  or \
+			options.debitbalance is None or \
+			options.info is None:
 				print "missing fields for create"
 				op.print_help()
+				return

 		c = Chart(v)

-		return c.create(options.details,options.debitbalance,options.info)
+		print c.create(options.details,options.debitbalance,options.info)

-		# FIXME call system to insert into table

-#			return
-
-
-#		if len(args) != 0:
-#			op.error('extra command line arguments: ' + ' '.join(args))
-
-		vstatus.change_state(STATE_CHART_IDLE, 1)
-
 	def details(self, state, event, params, v, vstatus):
 		args = self.input.split()
 		print "filename is %s" % (args[1],)