Closedown

This commit is contained in:
gobbo_a
2017-01-09 18:35:46 +01:00
parent 5c6f0e39ad
commit 71db608d95
11 changed files with 20 additions and 20 deletions
+5 -5
View File
@@ -131,7 +131,7 @@ def elog(title, message, attachments = [], author = None, category = "Info", dom
Add entry to ELOG.
"""
if author is None:
author = "pshell" #context.getUser().name
author = "pshell" #get_context().user.name
typ = "pshell"
entry = ""
@@ -156,7 +156,7 @@ def elog(title, message, attachments = [], author = None, category = "Info", dom
raise Exception(err)
print out
def get_plot_snapshots(title = None, file_type = "png", temp_path = context.setup.getContextPath()):
def get_plot_snapshots(title = None, file_type = "png", temp_path = get_context().setup.getContextPath()):
"""
Returns list with file names of plots snapshots from a plotting context.
"""
@@ -184,7 +184,7 @@ center_x.setPolling(100)
center_y.setPolling(100)
if not context.isLocalMode():
if not get_context().isLocalMode():
try:
run("camtool")
add_device(CamTool("image_stats", prefix = "SINEG01-DSCR190:", latch = True, camera = "SINEG01-DSCR190", gauss = False), True)
@@ -255,13 +255,13 @@ avy = create_averager(comy, 5, 0.001)
#CAS
if context.isServerEnabled():
if get_context().isServerEnabled():
import ch.psi.pshell.epics.CAS as CAS
#CAS.setServerPort(5062)
class ServerUrl(ReadonlyRegisterBase):
def doRead(self):
return context.server.baseURL
return get_context().server.baseURL
d = ServerUrl()
d.initialize()