Quantcast
Channel: A Portal to a Portal
Viewing all articles
Browse latest Browse all 1850

Argh, I hate macOS when it comes to the apostrophe character

$
0
0
It's days like this when I hate the way that macOS handles the apostrophe, also known as the single quote character.

Specifically, I mean this character: -

'

or do I mean THIS character: -

'

?

Yes, it's the latter and, for some annoying reason, macOS likes to switch from one to t'other, just to annoy me.

So I'm trying to run a Jython script: -

cellID=AdminControl.getCell()
nodeNames = AdminTask.listNodes().splitlines()
for nodeName in nodeNames:
 AdminControl.invoke('WebSphere:name=repository,process=nodeagent,platform=common,node='+nodeName+',version=5.0,type=ConfigRepository,mbeanIdentifier=repository,cell='+cellID+',spec=1.0','refreshRepositoryEpoch'


but I keep getting: -

Traceback (innermost last):
  (no code object) at line 0
  File "<input>", line 2
 AdminControl.invoke('WebSphere:name=repository,process=nodeagent,platform=common,node='+nodeName+',version=5.0,type=ConfigRepository,mbeanIdentifier=repository,cell='+cellID+',spec=1.0','refreshRepositoryEpoch')
                                                                                                                                                                                         ^
SyntaxError: invalid syntax

It took me an AGE to see where I was going wrong.

Once I fixed my syntax : -

cellID=AdminControl.getCell()
nodeNames = AdminTask.listNodes().splitlines()
for nodeName in nodeNames:
 AdminControl.invoke('WebSphere:name=repository,process=nodeagent,platform=common,node='+nodeName+',version=5.0,type=ConfigRepository,mbeanIdentifier=repository,cell='+cellID+',spec=1.0','refreshRepositoryEpoch') 

things moved along.

I then saw this: -

WASX7015E: Exception running command: ""; exception information:
javax.management.InstanceNotFoundException: WebSphere:name=repository,process=nodeagent,platform=common,node=Dmgr,version=5.0,type=ConfigRepository,mbeanIdentifier=repository,cell=PCCell1,spec=1.0


which makes sense, as I'm trying to synchronise a Deployment Manager ( there are two nodes within my cell, and my loop doesn't distinguish between them ).

I further fixed my script: -

cellID=AdminControl.getCell()
nodeNames = AdminTask.listNodes().splitlines()
for nodeName in nodeNames:
 if nodeName.find('D') == -1:
  AdminControl.invoke('WebSphere:name=repository,process=nodeagent,platform=common,node='+nodeName+',version=5.0,type=ConfigRepository,mbeanIdentifier=repository,cell='+cellID+',spec=1.0','refreshRepositoryEpoch')

and now have something that works ( it's primitive, in that it ignores nodes that begin with D e.g. Deployment Manager == Dmgr01


Viewing all articles
Browse latest Browse all 1850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>