MD500_Pilot

Untitled

Mar 17th, 2021
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. [notifications]
  2. alert_emails = ['[email protected]', '[email protected]']
  3.  
  4.  
  5.  
  6. def read_config_data(file, section, item):
  7. pathname = '/root/plot_manager/' + file
  8. config.read(pathname)
  9. return config.get(section, item)
  10.  
  11. email_address = read_config_data('plot_manager_config', 'notifications', 'alert_emails')
  12. print (email_address)
  13.  
  14. RETURNS:
  15.  
  16.  
  17.  
  18. But then I try this:
  19. email_address = read_config_data('plot_manager_config', 'notifications', 'alert_emails')
  20. for email in email_address:
  21. print (email)
  22.  
  23. IT RETURNS
  24. [
  25. '
  26. r
  27. i
  28. c
  29. h
  30. a
  31. r
  32. d
  33. j
  34. s
  35. @
  36. g
  37. m
  38. a
  39. i
  40. l
  41. .
  42. c
  43. o
  44. m
  45. '
  46. ,
  47.  
  48. '
  49. r
  50. i
  51. c
  52. h
  53. a
  54. r
  55. d
  56. @
  57. g
  58. a
  59. r
  60. d
  61. e
  62. n
  63. -
  64. p
  65. i
  66. .
  67. c
  68. o
  69. m
  70. '
  71. ]
Advertisement
Add Comment
Please, Sign In to add comment