mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-22 04:13:33 +01:00
Fix #9: Warning message for duplicate providers
This commit is contained in:
parent
42b03f768a
commit
de308abded
@ -29,7 +29,7 @@ from distutils.extension import Extension
|
|||||||
from Cython.Distutils import build_ext
|
from Cython.Distutils import build_ext
|
||||||
import os
|
import os
|
||||||
|
|
||||||
to_remove = """cython_setup.py version.py command_line.py""".split()
|
to_remove = """__init__.py cython_setup.py version.py command_line.py""".split()
|
||||||
ext_modules = []
|
ext_modules = []
|
||||||
|
|
||||||
files = os.listdir('.')
|
files = os.listdir('.')
|
||||||
|
@ -47,8 +47,18 @@ def create_variables():
|
|||||||
inside = False
|
inside = False
|
||||||
icount += 1
|
icount += 1
|
||||||
v = Variable(buffer,icount)
|
v = Variable(buffer,icount)
|
||||||
|
if v.name in result:
|
||||||
|
print "Warning: Duplicate provider for %s in"%(v.name)
|
||||||
|
print "- ", v.line.filename[0], " line ", v.line.i
|
||||||
|
print "- ", result[v.name].line.filename[0], " line ", result[v.name].line.i
|
||||||
|
print "Choosing first version"
|
||||||
result[v.name] = v
|
result[v.name] = v
|
||||||
for other in v.others:
|
for other in v.others:
|
||||||
|
if other in result:
|
||||||
|
print "Warning: Duplicate provider for %s in"%(other)
|
||||||
|
print "- ", v.line.filename[0], " line ", v.line.i
|
||||||
|
print "- ", result[other].line.filename[0], " line ", result[other].line.i
|
||||||
|
print "Choosing first version"
|
||||||
result[other] = Variable(buffer,icount,other)
|
result[other] = Variable(buffer,icount,other)
|
||||||
buffer = []
|
buffer = []
|
||||||
return result
|
return result
|
||||||
|
Loading…
Reference in New Issue
Block a user