We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pkg5_publisher throws KeyError with unexpected output from `pkg publisher -Ftsv`
##### Issue Type:

Bug Report
##### Ansible Version:

```
$ ansible --version
ansible 2.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = None
```
##### Summary:

I have a system with the output of publishers listed like so:

```
$ pkg publisher
PUBLISHER                             TYPE     STATUS   URI
delphix.com                           origin   online   file:///data/ips_repo/
ms.omniti.com                         origin   online   file:///data/ips_repo/
omnios                                origin   online   file:///data/ips_repo/
on-nightly                            origin   online   file:///net/pharos/export/pkg/dlpx-os-gate/nightly/repo.redist/
openindiana.org             
```

When I try to use the `pkg5_publisher` with the system configured like this, I get the following Python exception:

```
$ sudo python /tmp/ansible/ansible-tmp-1442291882.82-184265772797279/pkg5_publisher
Traceback (most recent call last):
  File "/tmp/ansible/ansible-tmp-1442291882.82-184265772797279/pkg5_publisher", line 1902, in <module>
    main()
  File "/tmp/ansible/ansible-tmp-1442291882.82-184265772797279/pkg5_publisher", line 95, in main
    modify_publisher(module, module.params)
  File "/tmp/ansible/ansible-tmp-1442291882.82-184265772797279/pkg5_publisher", line 102, in modify_publisher
    existing = get_publishers(module)
  File "/tmp/ansible/ansible-tmp-1442291882.82-184265772797279/pkg5_publisher", line 184, in get_publishers
    publishers[name][values['type']].append(values['uri'])
KeyError: ''
```

Looking at the source, `pkg5_publisher` tries to parse each line from the output of `pkg publisher -Ftsv` and assumes there will be a value for each column. Obviously this is not a valid assumption to make, as my system is proof this isn't guaranteed to be true, so it'd be nice of the module was able to handle this situation gracefully.

If I manually remove this publisher from the system with:

```
$ sudo pkg unset-publisher openindiana.org
$ pkg publisher -Ftsv
PUBLISHER   STICKY  PREFERRED   ENABLED TYPE    STATUS  URI
delphix.com true    true    true    origin  online  file:///data/ips_repo/
ms.omniti.com   true    false   true    origin  online  file:///data/ips_repo/
omnios  true    false   true    origin  online  file:///data/ips_repo/
on-nightly  true    false   true    origin  online  file:///net/pharos/export/pkg/dlpx-os-gate/nightly/repo.redist/
```

then the `pkg5_publisher` module will work, but the whole point of using this module is to remove the need to manually configure the system.

To make matters worse, I can't simply use:

```
- name: Remove openindiana.org Publisher
  command: pkg unset-publisher openindiana.org
```

prior to using `pkg5_publisher` because that command will fail if the publisher doesn't exist (e.g. on the second invocation of the playbook or role, after the publisher was removed the first time).


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `packaging/os/pkg5_publisher.py`
Content:
```
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3 
4 # Copyright 2014 Peter Oliver <ansible@mavit.org.uk>
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 
19 DOCUMENTATION = '''
20 ---
21 module: pkg5_publisher
22 author: "Peter Oliver (@mavit)"
23 short_description: Manages Solaris 11 Image Packaging System publishers
24 version_added: 1.9
25 description:
26   - IPS packages are the native packages in Solaris 11 and higher.
27   - This modules will configure which publishers a client will download IPS
28     packages from.
29 options:
30   name:
31     description:
32       - The publisher's name.
33     required: true
34     aliases: [ publisher ]
35   state:
36     description:
37       - Whether to ensure that a publisher is present or absent.
38     required: false
39     default: present
40     choices: [ present, absent ]
41   sticky:
42     description:
43       - Packages installed from a sticky repository can only receive updates
44         from that repository.
45     required: false
46     default: null
47     choices: [ true, false ]
48   enabled:
49     description:
50       - Is the repository enabled or disabled?
51     required: false
52     default: null
53     choices: [ true, false ]
54   origin:
55     description:
56       - A path or URL to the repository.
57       - Multiple values may be provided.
58     required: false
59     default: null
60   mirror:
61     description:
62       - A path or URL to the repository mirror.
63       - Multiple values may be provided.
64     required: false
65     default: null
66 '''
67 EXAMPLES = '''
68 # Fetch packages for the solaris publisher direct from Oracle:
69 - pkg5_publisher: name=solaris sticky=true origin=https://pkg.oracle.com/solaris/support/
70 
71 # Configure a publisher for locally-produced packages:
72 - pkg5_publisher: name=site origin=https://pkg.example.com/site/
73 '''
74 
75 def main():
76     module = AnsibleModule(
77         argument_spec=dict(
78             name=dict(required=True, aliases=['publisher']),
79             state=dict(default='present', choices=['present', 'absent']),
80             sticky=dict(type='bool'),
81             enabled=dict(type='bool'),
82             # search_after=dict(),
83             # search_before=dict(),
84             origin=dict(type='list'),
85             mirror=dict(type='list'),
86         )
87     )
88 
89     for option in ['origin', 'mirror']:
90         if module.params[option] == ['']:
91             module.params[option] = []
92 
93     if module.params['state'] == 'present':
94         modify_publisher(module, module.params)
95     else:
96         unset_publisher(module, module.params['name'])
97 
98 
99 def modify_publisher(module, params):
100     name = params['name']
101     existing = get_publishers(module)
102 
103     if name in existing:
104         for option in ['origin', 'mirror', 'sticky', 'enabled']:
105             if params[option] != None:
106                 if params[option] != existing[name][option]:
107                     return set_publisher(module, params)
108     else:
109         return set_publisher(module, params)
110 
111     module.exit_json()
112 
113 
114 def set_publisher(module, params):
115     name = params['name']
116     args = []
117 
118     if params['origin'] != None:
119         args.append('--remove-origin=*')
120         args.extend(['--add-origin=' + u for u in params['origin']])
121     if params['mirror'] != None:
122         args.append('--remove-mirror=*')
123         args.extend(['--add-mirror=' + u for u in params['mirror']])
124 
125     if params['sticky'] != None and params['sticky']:
126         args.append('--sticky')
127     elif params['sticky'] != None:
128         args.append('--non-sticky')
129 
130     if params['enabled'] != None and params['enabled']:
131         args.append('--enable')
132     elif params['enabled'] != None:
133         args.append('--disable')
134 
135     rc, out, err = module.run_command(
136         ["pkg", "set-publisher"] + args + [name],
137         check_rc=True
138     )
139     response = {
140         'rc': rc,
141         'results': [out],
142         'msg': err,
143         'changed': True,
144     }
145     module.exit_json(**response)
146 
147 
148 def unset_publisher(module, publisher):
149     if not publisher in get_publishers(module):
150         module.exit_json()
151 
152     rc, out, err = module.run_command(
153         ["pkg", "unset-publisher", publisher],
154         check_rc=True
155     )
156     response = {
157         'rc': rc,
158         'results': [out],
159         'msg': err,
160         'changed': True,
161     }
162     module.exit_json(**response)
163 
164 
165 def get_publishers(module):
166     rc, out, err = module.run_command(["pkg", "publisher", "-Ftsv"], True)
167 
168     lines = out.splitlines()
169     keys = lines.pop(0).lower().split("\t")
170 
171     publishers = {}
172     for line in lines:
173         values = dict(zip(keys, map(unstringify, line.split("\t"))))
174         name = values['publisher']
175 
176         if not name in publishers:
177             publishers[name] = dict(
178                 (k, values[k]) for k in ['sticky', 'enabled']
179             )
180             publishers[name]['origin'] = []
181             publishers[name]['mirror'] = []
182 
183         publishers[name][values['type']].append(values['uri'])
184 
185     return publishers
186 
187 
188 def unstringify(val):
189     if val == "-":
190         return None
191     elif val == "true":
192         return True
193     elif val == "false":
194         return False
195     else:
196         return val
197 
198 
199 from ansible.module_utils.basic import *
200 main()
201
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/packaging/os/pkg5_publisher.py b/packaging/os/pkg5_publisher.py
--- a/packaging/os/pkg5_publisher.py
+++ b/packaging/os/pkg5_publisher.py
@@ -180,13 +180,14 @@
             publishers[name]['origin'] = []
             publishers[name]['mirror'] = []
 
-        publishers[name][values['type']].append(values['uri'])
+        if values['type'] is not None:
+            publishers[name][values['type']].append(values['uri'])
 
     return publishers
 
 
 def unstringify(val):
-    if val == "-":
+    if val == "-" or val == '':
         return None
     elif val == "true":
         return True

{"golden_diff": "diff --git a/packaging/os/pkg5_publisher.py b/packaging/os/pkg5_publisher.py\n--- a/packaging/os/pkg5_publisher.py\n+++ b/packaging/os/pkg5_publisher.py\n@@ -180,13 +180,14 @@\n             publishers[name]['origin'] = []\n             publishers[name]['mirror'] = []\n \n-        publishers[name][values['type']].append(values['uri'])\n+        if values['type'] is not None:\n+            publishers[name][values['type']].append(values['uri'])\n \n     return publishers\n \n \n def unstringify(val):\n-    if val == \"-\":\n+    if val == \"-\" or val == '':\n         return None\n     elif val == \"true\":\n         return True\n", "issue": "pkg5_publisher throws KeyError with unexpected output from `pkg publisher -Ftsv`\n##### Issue Type:\n\nBug Report\n##### Ansible Version:\n\n```\n$ ansible --version\nansible 2.0.0\n  config file = /etc/ansible/ansible.cfg\n  configured module search path = None\n```\n##### Summary:\n\nI have a system with the output of publishers listed like so:\n\n```\n$ pkg publisher\nPUBLISHER                             TYPE     STATUS   URI\ndelphix.com                           origin   online   file:///data/ips_repo/\nms.omniti.com                         origin   online   file:///data/ips_repo/\nomnios                                origin   online   file:///data/ips_repo/\non-nightly                            origin   online   file:///net/pharos/export/pkg/dlpx-os-gate/nightly/repo.redist/\nopenindiana.org             \n```\n\nWhen I try to use the `pkg5_publisher` with the system configured like this, I get the following Python exception:\n\n```\n$ sudo python /tmp/ansible/ansible-tmp-1442291882.82-184265772797279/pkg5_publisher\nTraceback (most recent call last):\n  File \"/tmp/ansible/ansible-tmp-1442291882.82-184265772797279/pkg5_publisher\", line 1902, in <module>\n    main()\n  File \"/tmp/ansible/ansible-tmp-1442291882.82-184265772797279/pkg5_publisher\", line 95, in main\n    modify_publisher(module, module.params)\n  File \"/tmp/ansible/ansible-tmp-1442291882.82-184265772797279/pkg5_publisher\", line 102, in modify_publisher\n    existing = get_publishers(module)\n  File \"/tmp/ansible/ansible-tmp-1442291882.82-184265772797279/pkg5_publisher\", line 184, in get_publishers\n    publishers[name][values['type']].append(values['uri'])\nKeyError: ''\n```\n\nLooking at the source, `pkg5_publisher` tries to parse each line from the output of `pkg publisher -Ftsv` and assumes there will be a value for each column. Obviously this is not a valid assumption to make, as my system is proof this isn't guaranteed to be true, so it'd be nice of the module was able to handle this situation gracefully.\n\nIf I manually remove this publisher from the system with:\n\n```\n$ sudo pkg unset-publisher openindiana.org\n$ pkg publisher -Ftsv\nPUBLISHER   STICKY  PREFERRED   ENABLED TYPE    STATUS  URI\ndelphix.com true    true    true    origin  online  file:///data/ips_repo/\nms.omniti.com   true    false   true    origin  online  file:///data/ips_repo/\nomnios  true    false   true    origin  online  file:///data/ips_repo/\non-nightly  true    false   true    origin  online  file:///net/pharos/export/pkg/dlpx-os-gate/nightly/repo.redist/\n```\n\nthen the `pkg5_publisher` module will work, but the whole point of using this module is to remove the need to manually configure the system.\n\nTo make matters worse, I can't simply use:\n\n```\n- name: Remove openindiana.org Publisher\n  command: pkg unset-publisher openindiana.org\n```\n\nprior to using `pkg5_publisher` because that command will fail if the publisher doesn't exist (e.g. on the second invocation of the playbook or role, after the publisher was removed the first time).\n\n", "before_files": [{"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright 2014 Peter Oliver <ansible@mavit.org.uk>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nDOCUMENTATION = '''\n---\nmodule: pkg5_publisher\nauthor: \"Peter Oliver (@mavit)\"\nshort_description: Manages Solaris 11 Image Packaging System publishers\nversion_added: 1.9\ndescription:\n  - IPS packages are the native packages in Solaris 11 and higher.\n  - This modules will configure which publishers a client will download IPS\n    packages from.\noptions:\n  name:\n    description:\n      - The publisher's name.\n    required: true\n    aliases: [ publisher ]\n  state:\n    description:\n      - Whether to ensure that a publisher is present or absent.\n    required: false\n    default: present\n    choices: [ present, absent ]\n  sticky:\n    description:\n      - Packages installed from a sticky repository can only receive updates\n        from that repository.\n    required: false\n    default: null\n    choices: [ true, false ]\n  enabled:\n    description:\n      - Is the repository enabled or disabled?\n    required: false\n    default: null\n    choices: [ true, false ]\n  origin:\n    description:\n      - A path or URL to the repository.\n      - Multiple values may be provided.\n    required: false\n    default: null\n  mirror:\n    description:\n      - A path or URL to the repository mirror.\n      - Multiple values may be provided.\n    required: false\n    default: null\n'''\nEXAMPLES = '''\n# Fetch packages for the solaris publisher direct from Oracle:\n- pkg5_publisher: name=solaris sticky=true origin=https://pkg.oracle.com/solaris/support/\n\n# Configure a publisher for locally-produced packages:\n- pkg5_publisher: name=site origin=https://pkg.example.com/site/\n'''\n\ndef main():\n    module = AnsibleModule(\n        argument_spec=dict(\n            name=dict(required=True, aliases=['publisher']),\n            state=dict(default='present', choices=['present', 'absent']),\n            sticky=dict(type='bool'),\n            enabled=dict(type='bool'),\n            # search_after=dict(),\n            # search_before=dict(),\n            origin=dict(type='list'),\n            mirror=dict(type='list'),\n        )\n    )\n\n    for option in ['origin', 'mirror']:\n        if module.params[option] == ['']:\n            module.params[option] = []\n\n    if module.params['state'] == 'present':\n        modify_publisher(module, module.params)\n    else:\n        unset_publisher(module, module.params['name'])\n\n\ndef modify_publisher(module, params):\n    name = params['name']\n    existing = get_publishers(module)\n\n    if name in existing:\n        for option in ['origin', 'mirror', 'sticky', 'enabled']:\n            if params[option] != None:\n                if params[option] != existing[name][option]:\n                    return set_publisher(module, params)\n    else:\n        return set_publisher(module, params)\n\n    module.exit_json()\n\n\ndef set_publisher(module, params):\n    name = params['name']\n    args = []\n\n    if params['origin'] != None:\n        args.append('--remove-origin=*')\n        args.extend(['--add-origin=' + u for u in params['origin']])\n    if params['mirror'] != None:\n        args.append('--remove-mirror=*')\n        args.extend(['--add-mirror=' + u for u in params['mirror']])\n\n    if params['sticky'] != None and params['sticky']:\n        args.append('--sticky')\n    elif params['sticky'] != None:\n        args.append('--non-sticky')\n\n    if params['enabled'] != None and params['enabled']:\n        args.append('--enable')\n    elif params['enabled'] != None:\n        args.append('--disable')\n\n    rc, out, err = module.run_command(\n        [\"pkg\", \"set-publisher\"] + args + [name],\n        check_rc=True\n    )\n    response = {\n        'rc': rc,\n        'results': [out],\n        'msg': err,\n        'changed': True,\n    }\n    module.exit_json(**response)\n\n\ndef unset_publisher(module, publisher):\n    if not publisher in get_publishers(module):\n        module.exit_json()\n\n    rc, out, err = module.run_command(\n        [\"pkg\", \"unset-publisher\", publisher],\n        check_rc=True\n    )\n    response = {\n        'rc': rc,\n        'results': [out],\n        'msg': err,\n        'changed': True,\n    }\n    module.exit_json(**response)\n\n\ndef get_publishers(module):\n    rc, out, err = module.run_command([\"pkg\", \"publisher\", \"-Ftsv\"], True)\n\n    lines = out.splitlines()\n    keys = lines.pop(0).lower().split(\"\\t\")\n\n    publishers = {}\n    for line in lines:\n        values = dict(zip(keys, map(unstringify, line.split(\"\\t\"))))\n        name = values['publisher']\n\n        if not name in publishers:\n            publishers[name] = dict(\n                (k, values[k]) for k in ['sticky', 'enabled']\n            )\n            publishers[name]['origin'] = []\n            publishers[name]['mirror'] = []\n\n        publishers[name][values['type']].append(values['uri'])\n\n    return publishers\n\n\ndef unstringify(val):\n    if val == \"-\":\n        return None\n    elif val == \"true\":\n        return True\n    elif val == \"false\":\n        return False\n    else:\n        return val\n\n\nfrom ansible.module_utils.basic import *\nmain()\n", "path": "packaging/os/pkg5_publisher.py"}], "after_files": [{"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright 2014 Peter Oliver <ansible@mavit.org.uk>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nDOCUMENTATION = '''\n---\nmodule: pkg5_publisher\nauthor: \"Peter Oliver (@mavit)\"\nshort_description: Manages Solaris 11 Image Packaging System publishers\nversion_added: 1.9\ndescription:\n  - IPS packages are the native packages in Solaris 11 and higher.\n  - This modules will configure which publishers a client will download IPS\n    packages from.\noptions:\n  name:\n    description:\n      - The publisher's name.\n    required: true\n    aliases: [ publisher ]\n  state:\n    description:\n      - Whether to ensure that a publisher is present or absent.\n    required: false\n    default: present\n    choices: [ present, absent ]\n  sticky:\n    description:\n      - Packages installed from a sticky repository can only receive updates\n        from that repository.\n    required: false\n    default: null\n    choices: [ true, false ]\n  enabled:\n    description:\n      - Is the repository enabled or disabled?\n    required: false\n    default: null\n    choices: [ true, false ]\n  origin:\n    description:\n      - A path or URL to the repository.\n      - Multiple values may be provided.\n    required: false\n    default: null\n  mirror:\n    description:\n      - A path or URL to the repository mirror.\n      - Multiple values may be provided.\n    required: false\n    default: null\n'''\nEXAMPLES = '''\n# Fetch packages for the solaris publisher direct from Oracle:\n- pkg5_publisher: name=solaris sticky=true origin=https://pkg.oracle.com/solaris/support/\n\n# Configure a publisher for locally-produced packages:\n- pkg5_publisher: name=site origin=https://pkg.example.com/site/\n'''\n\ndef main():\n    module = AnsibleModule(\n        argument_spec=dict(\n            name=dict(required=True, aliases=['publisher']),\n            state=dict(default='present', choices=['present', 'absent']),\n            sticky=dict(type='bool'),\n            enabled=dict(type='bool'),\n            # search_after=dict(),\n            # search_before=dict(),\n            origin=dict(type='list'),\n            mirror=dict(type='list'),\n        )\n    )\n\n    for option in ['origin', 'mirror']:\n        if module.params[option] == ['']:\n            module.params[option] = []\n\n    if module.params['state'] == 'present':\n        modify_publisher(module, module.params)\n    else:\n        unset_publisher(module, module.params['name'])\n\n\ndef modify_publisher(module, params):\n    name = params['name']\n    existing = get_publishers(module)\n\n    if name in existing:\n        for option in ['origin', 'mirror', 'sticky', 'enabled']:\n            if params[option] != None:\n                if params[option] != existing[name][option]:\n                    return set_publisher(module, params)\n    else:\n        return set_publisher(module, params)\n\n    module.exit_json()\n\n\ndef set_publisher(module, params):\n    name = params['name']\n    args = []\n\n    if params['origin'] != None:\n        args.append('--remove-origin=*')\n        args.extend(['--add-origin=' + u for u in params['origin']])\n    if params['mirror'] != None:\n        args.append('--remove-mirror=*')\n        args.extend(['--add-mirror=' + u for u in params['mirror']])\n\n    if params['sticky'] != None and params['sticky']:\n        args.append('--sticky')\n    elif params['sticky'] != None:\n        args.append('--non-sticky')\n\n    if params['enabled'] != None and params['enabled']:\n        args.append('--enable')\n    elif params['enabled'] != None:\n        args.append('--disable')\n\n    rc, out, err = module.run_command(\n        [\"pkg\", \"set-publisher\"] + args + [name],\n        check_rc=True\n    )\n    response = {\n        'rc': rc,\n        'results': [out],\n        'msg': err,\n        'changed': True,\n    }\n    module.exit_json(**response)\n\n\ndef unset_publisher(module, publisher):\n    if not publisher in get_publishers(module):\n        module.exit_json()\n\n    rc, out, err = module.run_command(\n        [\"pkg\", \"unset-publisher\", publisher],\n        check_rc=True\n    )\n    response = {\n        'rc': rc,\n        'results': [out],\n        'msg': err,\n        'changed': True,\n    }\n    module.exit_json(**response)\n\n\ndef get_publishers(module):\n    rc, out, err = module.run_command([\"pkg\", \"publisher\", \"-Ftsv\"], True)\n\n    lines = out.splitlines()\n    keys = lines.pop(0).lower().split(\"\\t\")\n\n    publishers = {}\n    for line in lines:\n        values = dict(zip(keys, map(unstringify, line.split(\"\\t\"))))\n        name = values['publisher']\n\n        if not name in publishers:\n            publishers[name] = dict(\n                (k, values[k]) for k in ['sticky', 'enabled']\n            )\n            publishers[name]['origin'] = []\n            publishers[name]['mirror'] = []\n\n        if values['type'] is not None:\n            publishers[name][values['type']].append(values['uri'])\n\n    return publishers\n\n\ndef unstringify(val):\n    if val == \"-\" or val == '':\n        return None\n    elif val == \"true\":\n        return True\n    elif val == \"false\":\n        return False\n    else:\n        return val\n\n\nfrom ansible.module_utils.basic import *\nmain()\n", "path": "packaging/os/pkg5_publisher.py"}]}