Github user bhaisaab commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/587#discussion_r34755507
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsFile.py ---
    @@ -35,10 +35,9 @@ def load(self):
                     self.new_config.append(line)
             except IOError:
                 logging.debug("File %s does not exist" % self.filename)
    -            return
             else:
                 logging.debug("Reading file %s" % self.filename)
    -            self.config = copy.deepcopy(self.new_config)
    +            self.config = list(self.new_config)
    --- End diff --
    
    Alright, as I mentioned in my comment if the list contains (references to) 
other objects then only copy.deepcopy should be used. I was not clear about the 
usage, after reading the code I think it would work since we're working with 
list of strings (read from file), followed by append/insert operations; list() 
would be indeed faster than copy.deepcopy in this case as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to