Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Provide defaults for repo config fields

  • Loading branch information...
commit d91381171180c2fa6852ae78928427c6a580c8f0 1 parent 691ec70
@elskwid elskwid authored
Showing with 11 additions and 2 deletions.
  1. +11 −2 pscheck.rb
View
13 pscheck.rb
@@ -769,12 +769,21 @@ def initialize(options={})
if parse_xml
_server_id = @xml.root.elements["ServerId"]
- @customer_id = _server_id.get_text("CustomerId").value().to_s
- @installation_id = _server_id.get_text("InstallationId").value().to_s
+ # @customer_id = _server_id.get_text("CustomerId").value().to_s
+ @customer_id = get_text(_server_id, "CustomerId", "UNKNOWN")
+ # @installation_id = _server_id.get_text("InstallationId").value().to_s
+ @installation_id = get_text(_server_id, "InstallationId", "00")
@server_id = "#{@customer_id}#{@installation_id}"
end
end
+ def get_text(node, name, default)
+ if text = node.get_text(name)
+ text.value().to_s
+ else
+ default
+ end
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.