From fd1e4610fa8e259dac29af80b9ed4f4747a157dd Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Sat, 2 Jan 2016 15:27:51 +0100 Subject: [PATCH] Use split_query function Instead of having it duplicated there --- relational_readline/linegui.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/relational_readline/linegui.py b/relational_readline/linegui.py index 08aaad9..5226d8e 100644 --- a/relational_readline/linegui.py +++ b/relational_readline/linegui.py @@ -25,6 +25,7 @@ import os import sys from relational import relation, parser, rtypes +from relational import maintenance from xtermcolor import colorize PROMPT_COLOR = 0xffff00 @@ -139,7 +140,6 @@ def load_relation(filename, defname=None): def survey(): '''performs a survey''' - from relational import maintenance post = {'software': 'Relational algebra (cli)', 'version': version} @@ -283,13 +283,7 @@ def exec_query(command): # Finds the name in where to save the query parts = command.split('=', 1) - - if len(parts) > 1 and rtypes.is_valid_relation_name(parts[0]): - relname = parts[0] - query = parts[1] - else: - relname = 'last_' - query = command + relname,query = maintenance.UserInterface.split_query(command) # Execute query try: