Use split_query function

Instead of having it duplicated there
master
Salvo 'LtWorf' Tomaselli 2016-01-02 15:27:51 +07:00
parent e3877a4682
commit fd1e4610fa
1 changed files with 2 additions and 8 deletions

@ -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: